I know previously I have discussed how to minimise the risk factors associate with muscle cramps including during pregnancy.
Exercise Related Muscle Cramps
May occur during, after or in some case many hours after vigorous activity. In addition to minimising the risk factors I have previously documented you need to ensure you
Don't exercise when injured - cramps can occur as a protective mechanism following an injury.
Warm up thoroughly
Stretch before and after exercise
Cool down properly
Don't over do it - their is a clear correlation between muscle fatigue and cramps. In addition if you suddenly place a huge physical demand on the body (e.g. a late spurt to win the race) that it is not used to, your body can react by contracting all the muscle and creating cramps. So remember to follow a suitable training program before entering that competition!
Night cramps and other rest cramps can often be prevented by regular stretching exercises particularly before going to bed. The most common night cramps are in the calf muscles, to stretch this muscle
Stand about 2 or 2.5 feet away from a wall. Lean into the wall to place the forearms against the wall with the knees and back straight and the heels in contact with the floor. Hold for 10 to 15 seconds and repeat three times before going to bed.
In bed while lying down, you can try flexing the ankle by pulling the toes up toward the head with the leg as straight as possible.