Magnesium for Sleep, Cramps and Recovery

Magnesium is a mineral involved in hundreds of biochemical reactions, from energy production to muscle and nerve function. Athletes often ask whether topping up magnesium can ease cramps, improve sleep and speed recovery. The honest answer is that magnesium is genuinely important, but its benefits are clearest when intake is low. This article separates the well-supported roles from the overselling.
Why magnesium matters
Magnesium acts as a cofactor for more than 300 enzyme systems, including those that release energy from food and build proteins. It is essential for normal muscle contraction and relaxation, nerve signalling and the maintenance of healthy bones. Because it is involved in energy metabolism, magnesium status is particularly relevant to people who train frequently and place high demands on their muscles.
Does magnesium reduce cramps?
Muscle cramps are commonly blamed on magnesium deficiency, and supplementation is a popular remedy. The evidence, however, is underwhelming. Reviews of exercise-associated and general muscle cramps have generally not found strong support for magnesium as an effective treatment in people who are not deficient. Cramps often have other causes, including fatigue and neuromuscular factors. If your intake is adequate, extra magnesium is unlikely to solve cramping on its own.
Magnesium and sleep
Magnesium contributes to normal nervous system function, and low levels have been linked with poorer sleep in some observational studies. A few small trials suggest modest sleep benefits, particularly in older adults or those with low magnesium status, but the overall evidence is limited and not strong enough to promise better sleep for everyone. Good sleep hygiene remains the foundation.
Recovery and performance
Adequate magnesium supports normal energy-yielding metabolism and muscle function, both important for recovery. When athletes are deficient, correcting the shortfall can improve exercise performance and reduce fatigue. In athletes who already meet their needs, however, extra magnesium has not been reliably shown to enhance performance. This pattern, where fixing a deficiency helps but topping up an adequate intake does not, is a recurring theme across most micronutrients and is worth keeping in mind before reaching for a supplement.
Who is at risk of low magnesium?
Many people fall short of recommended magnesium intakes, and athletes can be at particular risk. Contributing factors include:
- Low intake of magnesium-rich foods such as wholegrains, nuts and leafy greens.
- High training volumes, which may increase magnesium losses through sweat and urine.
- Restricted or low-energy diets, common in weight-category and aesthetic sports.
- Heavy sweating over prolonged sessions.
How much do you need?
Recommended intakes are broadly around 300 to 420 mg per day for adults, varying by sex and reference body. Most of this should come from food. The NIH sets a tolerable upper intake level of 350 mg per day for magnesium from supplements only, which is separate from magnesium obtained from food and drink. Exceeding supplemental magnesium can cause diarrhoea and stomach upset, since the mineral has a laxative effect at high doses. Different forms of magnesium are absorbed differently, and cheaper forms such as magnesium oxide are more likely to cause digestive discomfort, but no single form has been proven clearly superior for athletic outcomes.
Food sources of magnesium
- Nuts and seeds such as almonds, cashews, pumpkin seeds and sunflower seeds.
- Wholegrains including brown rice, oats and wholemeal bread.
- Legumes such as beans, lentils and chickpeas.
- Leafy green vegetables like spinach and Swiss chard.
- Dark chocolate and some fish, which provide useful amounts.
Practical guidance
The best strategy for most athletes is to build meals around wholefoods that naturally contain magnesium. If you follow a restricted diet, train at high volumes or suspect low intake, a modest supplement within the upper limit may help, ideally alongside advice from a dietitian. Be wary of products promising dramatic sleep or cramp cures, as the evidence for those specific claims in well-nourished athletes is weak.
Key takeaways
- Magnesium supports energy metabolism, muscle and nerve function and bone health.
- Evidence that supplements cure cramps or reliably improve sleep in well-nourished people is weak.
- Correcting a deficiency can improve performance and reduce fatigue; extra magnesium beyond needs does not.
- Adults generally need about 300 to 420 mg daily, mostly from food.
- The supplemental upper limit is 350 mg per day; higher doses can cause diarrhoea.
- Nuts, seeds, wholegrains, legumes and leafy greens are excellent food sources.
References
- Magnesium — Health Professional Fact Sheet — NIH Office of Dietary Supplements
- Garrison SR et al., Magnesium for skeletal muscle cramps, Cochrane Database of Systematic Reviews, 2020 — Cochrane Database of Systematic Reviews
- Zhang Y et al., Can Magnesium Enhance Exercise Performance?, Nutrients, 2017 — Nutrients
- Scientific Opinion on Dietary Reference Values for magnesium (2015) — EFSA Panel on Dietetic Products, Nutrition and Allergies


