The other theory, which is long standing, is that cramps result from electrolyte imbalances and dehydration. Electrolytes are minerals that carry electric charges to the muscles to help them contract or relax. And insufficient amounts in the diet can lead to muscle weakness and cramps as well as other problems. Potassium, calcium, magnesium, and salt are the electrolytes of major concern. They say that dehydration should not be a precipitating factor.
Most athletes know how to stay well hydrated.
Also, electrolyte replacement should not be a concern. The preferred hydration fluids among runners are sports drinks that contain electrolytes. In addition electrolytes are so widely distributed in the foods we eat that intake far exceeds need, even that required for marathoner. We get calcium from milk, yogurt, salmon, shrimp, dark leafy vegetables, dried beans and peas. Rich sources of magnesium are whole grain products, nuts, apricots, dark green leafy vegetables, and soybeans.