crampes musculaires

Muscle Cramps and Sports: The Key Role of Magnesium and Electrolytes

Bouteille de boisson sportive avec citron et feuilles de menthe sur une surface en bois

Muscle cramps during or after exercise are one of the most common complaints among athletes, regardless of the discipline. Sudden pain, a muscle that contracts involuntarily: a cramp can ruin an entire workout or disrupt a night's sleep. But what is the real cause, and above all, how can they be effectively prevented? Magnesium, often underestimated, plays a central role in this story, as do hydration and overall electrolyte balance.

Why do muscle cramps occur during sports?

Loss of electrolytes through sweating

When you sweat, you don't just lose water. Your sweat contains essential minerals such as sodium, potassium and magnesium, collectively known as electrolytes. These minerals are essential for proper neuromuscular function: they regulate communication between nerves and muscles and allow your muscle fibers to contract and then relax properly.

When their concentration drops too quickly, muscle coordination becomes disrupted. The muscle then receives contraction signals without being able to relax normally, causing the cramp. Prolonged exertion, excessive heat or insufficient hydration accelerate this process. This is why cramps are more common during summer competitions, late-season matches or long-distance outings.

Magnesium deficiency: an often-overlooked factor

Magnesium is one of the minerals most commonly lacking in the European population. A landmark French study (SU.VI.MAX) showed that more than 70% of adults have magnesium intakes below the recommended daily amount (375 mg per day). This deficiency is even more pronounced in physically active people, as exercise increases magnesium losses through sweat and urine.

Magnesium deficiency often manifests as nighttime calf cramps, muscle tremors, persistent fatigue and increased nervousness. If you regularly experience cramps outside of any intense exercise, your magnesium intake is probably insufficient.

Magnesium never acts alone. We explain the full trio of sodium, potassium and magnesium in our article about cramps and the role of electrolytes.

Magnesium and muscles: how it works

The role of magnesium in muscle contraction and relaxation

Magnesium acts as a natural antagonist to calcium in muscle cells. Calcium triggers contraction, while magnesium enables relaxation. Without an adequate magnesium intake, the muscle remains partially contracted, which promotes cramps, spasms and chronic tension.

More specifically, magnesium is involved in the production of ATP (the energy molecule in cells), the regulation of intracellular calcium and the transmission of nerve impulses. Even a mild deficiency can therefore affect both athletic performance and muscle recovery.

Magnesium and potassium: an essential duo for athletes

Potassium works closely with magnesium to maintain the electrolyte balance of cells. An adequate potassium intake helps maintain the proper osmotic pressure in muscle cells, facilitating the absorption of nutrients and the elimination of metabolic waste produced during exercise.

Endurance athletes and those who participate in sports involving frequent bursts of acceleration (football, basketball, tennis) are particularly exposed to combined potassium and magnesium deficiency. A good strategy is to meet these needs primarily through food, supplementing them if necessary with a drink or supplement containing both minerals in a highly absorbable form.

To find out when a mineralized drink is truly justified, our electrolyte drinks guide distinguishes between long exercise, extreme heat and an ordinary day.

How to prevent muscle cramps naturally

Magnesium-rich diet: foods to prioritize

The first line of defense against cramps is diet. The richest dietary sources of magnesium are pumpkin and sunflower seeds, almonds and cashews, dark chocolate (at least 70%), legumes (lentils, chickpeas), whole grains and green leafy vegetables such as spinach and Swiss chard.

Potassium is abundant in bananas, avocados, sweet potatoes, white beans and dried fruit. Regularly incorporating these foods into your diet provides a solid foundation for meeting your electrolyte needs, especially if you exercise several times a week.

Hydration and electrolytes: before, during and after exercise

Beyond diet, hydration plays a fundamental role in preventing cramps. Drinking enough water before, during and after exercise helps maintain blood volume, facilitates the transport of electrolytes to the muscles and eliminates metabolic waste that accumulates during exercise.

During exercise lasting more than an hour or in very hot conditions, drinking plain water is not always enough. The body needs to replenish the electrolytes lost through sweating, particularly sodium, potassium and magnesium. This is where an electrolyte-enriched hydration drink can make a difference, helping maintain the body's mineral balance during and after exercise.

There is also a homemade version, less precise but useful when you have nothing else available. The recipe is in our article about homemade electrolyte drinks.

Nighttime cramps: a specific case to understand

Nighttime cramps, particularly in the calves, affect a large proportion of the adult population. They most often occur during the second half of the night and can be very painful. Several factors can trigger or worsen them: a sedentary lifestyle, chronic dehydration, certain medications (particularly diuretics) and, of course, magnesium deficiency.

Several simple habits have proven effective: stretch your calves before going to bed, make sure you stay well hydrated throughout the day and, if necessary, consider a magnesium course lasting 1 to 3 months. The forms of magnesium best absorbed by the body are bisglycinate, citrate and malate, which are preferable to oxide and chloride forms, which are less well absorbed.

Our electrolyte sticks provide 56 mg of magnesium, 300 mg of potassium and 252 mg of sodium per stick, with no sugar. The amounts in other brands are compared on drinkscore.info.

FAQ: your questions about cramps and magnesium

Why do I only get cramps at night?

Nighttime cramps are often linked to a combination of factors: magnesium deficiency, poor venous circulation in the legs, a sleeping position that compresses certain nerves or cumulative dehydration throughout the day. Unlike exercise-related cramps, they are not directly linked to physical exertion. If they occur frequently, it is best to speak with a doctor to rule out an underlying cause.

How much magnesium should I take per day to prevent cramps?

The recommended daily magnesium intake is 375 mg for an adult. In cases of recurrent cramps, some healthcare professionals recommend temporary supplementation of 200 to 400 mg per day, in addition to dietary intake. A 4- to 8-week course is generally enough to correct a deficiency. It is best not to exceed 500 mg per day from supplements without medical advice.

Do bananas really help with cramps?

Bananas are rich in potassium (about 400 mg per fruit), making them useful for cramps related to potassium deficiency. But they contain little magnesium. If your cramps are mainly caused by magnesium deficiency, a banana alone will not be enough. Combining several foods rich in different electrolytes is always more effective than relying on a single food.

Are stretches enough to prevent cramps?

Regular stretching improves muscle flexibility and can reduce the frequency of cramps by decreasing residual tension in the muscles. But it does not compensate for an electrolyte deficiency. Stretching and hydration complement each other and should go hand in hand for effective cramp prevention, particularly among regular athletes.

What should I do immediately when a cramp occurs?

When a cramp occurs, the first thing to do is gently stretch the affected muscle: for a calf cramp, flex your foot toward you by pulling your toes upward. Gently massage the area to promote blood circulation. If the pain persists, a warm compress can help relax the muscle. After the episode, hydrate and plan to replenish your electrolytes for the rest of the day.

The key takeaway

Muscle cramps are not inevitable. A diet rich in magnesium and potassium, combined with good hydration and an electrolyte intake suited to your activity level, is enough in the vast majority of cases to prevent them effectively. Start by adjusting your diet and pay particular attention to your water intake around your workouts: results are often noticeable within just a few weeks.

Reading next

Verre d'eau fraîche posé sur une table en bois clair à la lumière du jour
Feuilles de yerba maté et graines de guarana à côté d'un verre de boisson énergisante naturelle