Typically cramping is due to muscle fatigue, dehydration, and/or a loss of electrolytes. Muscle fatigue is often overlooked by athletes, and an electrolyte imbalance is assumed to be the issue. That could very well be the case, or likely a combination of the two. Try to accurately assess your training. Are you over training? Are you generally fatigued? Is recovery time diminished? Is it a specific muscle that continually cramps? These may point to muscle fatigue rather than dehydration and electrolyte imbalance.
Electrolyte imbalance is typically associated with dehydration as the body cools itself releasing water and sodium through sweat. Electrolytes are minerals that dissolve in the body as electrically charged particles. They include sodium, chloride, magnesium, and potassium. Electrolytes have a direct effect on muscle cramping because they regulate fluid balance, nerve conduction, and muscle contraction.
If causes of cramping are muscle fatigue then the athlete needs to takes steps to allow the muscles to properly recovery. Proper nutrition, massage, rest, and icing/cold baths are some things to look into for improvement. If it's purely an electrolyte imbalance then one needs to evaluate sweat rate, diet, sodium concentration, and pre/during/post intake of electrolytes and salt.
Below are excerpts from a few good articles that discuss cramping. The final two discuss overall body balance and stress levels and how they have an impact on your ability to absorb water and retain the electrolytes necessary to reduce cramping.
As the water and sodium content of the body decreases through sweating, the muscles can begin to systemically cramp. Sodium is the key electrolyte in the formula because sodium helps the body to retain water, especially in the muscle fluid spaces. Without a high enough concentration of sodium, the water that the athlete drinks is excreted without being distributed throughout all of the body’s fluid compartments.
According to Bergeron’s (2008) research, immediate consumption of a “.5L carbohydrate-electrolyte drink with 3.0g of salt added and thoroughly mixed consumed all at once or over 5 – 10 minutes” has proven successful at relieving muscle cramps and preventing future severe cramping. As the cramping resolves, these athletes may be able to continue competing at their normal intensity.
~ Treating and Preventing Muscle Cramps during Exercise
The sodium-potassium balance becomes an important factor in cramping for athletes, particularly those under a great deal of stress or during high volume training. The aerobic base is crucial to help maintain healthy adrenal function and sodium re-absorption by the kidneys. An overtrained athlete leaning more towards the anaerobic side will show signs of adrenal fatigue, resulting in sodium loss. This can reveal itself with symptoms such as cramping, physical and mental fatigue, a chronic feeling of thirst, a feeling of dizziness or lightheadedness upon standing, and craving for salty foods. Though salt tablets and sodium-rich foods may help the athlete short term or through a race, the key is to address rebuilding the adrenals so the sodium isn’t lost.
~ Cramping Your Style
Decreasing the nutritional, emotional, and physical stresses will take the burden off the adrenal glands allowing them to produce normal amounts of cortisol so inflammation can be dealt with as needed. Decreased cortisol levels are seen in persons with chronic joint and muscle aches, as well as chronic fatigue syndromes."
~ Light on Salt