Cramps from overdoing exercise can be caused by several things; including dehydration, overuse of muscles, poor posture, gravity pulling abdominal muscles downward, and deficiencies in minerals such as magnesium, calcium and potassium. Slow down or stop the exercise, take some sips of diluted sports drink, raise your arms above your head and take long slow deep breaths. In the future, stay hydrated, bring fluids along with you when exercising, and keep the exercise less intense so you can work up your fitness level more gradually and your body can adjust to the exercise. If the cramps persevere for longer than a few weeks, or become severe, seek medical attention.