Sweatr
All articles
Hydration Science6 min read19 August 2026

Magnesium for Runners: What It Actually Does for Cramps, Sleep, and Recovery

The science on magnesium and cramps is weaker than you think. The real benefit is sleep and recovery — and your watch data proves it.

Magnesium for Runners: What It Actually Does for Cramps, Sleep, and Recovery

In Summary

  • Magnesium probably won't prevent your mid-race cramps — the evidence is weak.
  • The real benefit is better sleep and faster recovery, visible in your HRV data.
  • Most runners are mildly deficient without knowing it — sweat losses add up.
  • Your watch already tracks the metrics that show whether magnesium is working.

Every runner who's ever cramped at mile 20 has been told to take magnesium. It's one of the most common pieces of advice in endurance communities — right up there with "eat more salt" and "slow down."

But the science tells a more nuanced story. Magnesium does matter for runners. Just not for the reason most people think.

The Cramp Question: What the Research Actually Says

Let's get this out of the way first, because it's the reason most runners start Googling magnesium in the first place.

The 2020 Cochrane review — the gold standard for medical evidence — looked at randomised trials of magnesium supplementation for exercise-associated muscle cramps. The conclusion: "unlikely to be a clinically meaningful effect."

That doesn't mean magnesium is useless. It means that if you're cramping during a marathon, magnesium supplementation probably isn't the fix.

Exercise-associated cramps are more reliably linked to three other factors:

  • Premature fatigue from going out too fast relative to fitness
  • Inadequate sodium intake during the event itself
  • Insufficient heat acclimatisation for the conditions

If you've been cramping in races, your first moves should be adjusting your pacing strategy, dialling in your sodium intake per hour, and logging enough training time in the heat. Magnesium is further down the list.

Where Magnesium Actually Earns Its Place

Here's where it gets interesting. Magnesium is a cofactor in over 300 enzymatic reactions in your body, including ATP production (the energy currency your muscles run on), muscle contraction and relaxation, nerve signal transmission, and protein synthesis for muscle repair.

Endurance athletes have measurably lower magnesium levels than sedentary people. You lose magnesium through sweat — estimates range from 3 to 15 mg per litre of sweat — and your metabolic demand for it increases with training load. The harder and longer you train, the more you use.

Studies show that endurance athletes have a 50-60% higher magnesium requirement than sedentary individuals. If you're running 40-plus miles a week in the summer, you're almost certainly not replacing what you lose through diet alone.

The result isn't dramatic. You won't bonk because of low magnesium. But chronic mild deficiency shows up as poor sleep quality, sluggish recovery between sessions, higher resting heart rate, reduced aerobic capacity, and yes — nighttime cramps (distinct from exercise cramps, and more responsive to magnesium).

The Sleep Connection Your Watch Already Tracks

This is where magnesium becomes genuinely useful for runners — and where your wearable data starts telling the story.

Magnesium interacts with GABA receptors in your brain, the same neurotransmitter system that promotes calm and sleep onset. Supplementing with magnesium glycinate (200-400 mg before bed) consistently shows modest but real improvements in sleep quality across multiple trials.

For runners, this matters more than you might think. Deep sleep is when your body releases the majority of growth hormone, repairs muscle tissue, and consolidates the neuromuscular adaptations from your training. Poor sleep quality doesn't just make you tired — it actively slows recovery.

And here's the part that makes it measurable: your watch already tracks the downstream effects. If you wear a Garmin or Apple Watch overnight, you're recording HRV (heart rate variability), resting heart rate, sleep stages, and — on Garmin — Body Battery and recovery scores.

Athletes who start magnesium supplementation often report seeing their HRV trend upward and their resting heart rate tick down over two to four weeks. This isn't a coincidence. Better sleep quality improves parasympathetic nervous system function, which is exactly what HRV measures.

The key insight: magnesium doesn't show up in your race-day performance directly. It shows up in your recovery data, which compounds over weeks and months of training.

How Much You Need and Which Type to Take

Not all magnesium supplements are equal. The type determines how well it's absorbed and what it's best for.

Magnesium glycinate (bisglycinate) is the best all-round choice for runners. High bioavailability, minimal GI side effects, and the glycine component itself promotes relaxation. Take 200-400 mg before bed.

Magnesium citrate is well-absorbed but can have a laxative effect at higher doses — not ideal if you're already managing runner's gut.

Magnesium oxide is cheap and widely available but poorly absorbed. Most of it passes through your system without being used.

Magnesium threonate (Magtein) crosses the blood-brain barrier more effectively and has some evidence for cognitive benefits, but it's more expensive and the research is still limited.

For most runners, magnesium glycinate at 200-400 mg before bed is the straightforward choice. You need at least four to six weeks of consistent use to see meaningful changes in your recovery metrics.

When Diet Isn't Enough

The recommended daily intake for magnesium is 400-420 mg for men and 310-320 mg for women. Runners need more.

Good dietary sources include dark leafy greens (spinach, Swiss chard), pumpkin seeds, almonds, black beans, dark chocolate (70%+), and avocado. A balanced diet can get you to baseline — but if you're training 30-plus miles a week and sweating heavily, the gap between intake and expenditure widens.

You don't need a blood test to start supplementing — serum magnesium is a poor marker of whole-body status anyway, since only 1% of your magnesium is in your blood. The practical approach: start supplementing, watch your recovery metrics for four to six weeks, and see if the data moves.

Using Your Watch Data to Track the Effect

Here's how to run your own experiment with the tools you already have:

Week 1-2: Baseline. Note your average HRV, resting heart rate, sleep score, and Garmin Body Battery morning charge (or Apple Watch equivalent). Don't change anything else.

Week 3-8: Start magnesium glycinate, 200-400 mg before bed. Keep training load consistent. Continue tracking the same metrics.

What to look for: A gradual upward trend in HRV (even 3-5 ms is meaningful over weeks), a small decrease in resting heart rate, improved sleep stage distribution (more deep sleep), and subjectively better readiness in the morning.

This isn't a clinical trial. But it's a practical way to see whether magnesium is moving the needle on your recovery — using data your watch already collects.

Sweatr takes this further by pulling your wearable recovery data — HRV trends, sleep quality, training load — and factoring it into your personalised fueling and hydration recommendations. When your recovery data shows you're under-recovered, Sweatr adjusts your plan. It's the layer that turns passive watch data into decisions you can act on.

The Bottom Line

Magnesium won't save you from mid-race cramps. For that, you need a proper sodium strategy, adequate pacing, and heat acclimatisation.

But magnesium is one of the most practical recovery tools available to endurance athletes. It improves sleep quality, supports faster recovery between sessions, and shows up in the wearable metrics you're already tracking.

If you're training hard for a fall race and your HRV has been trending down or your sleep quality has been poor, magnesium glycinate before bed is a low-risk, evidence-backed place to start. Give it six weeks and let your watch data tell you whether it's working.

Your body produces the data. Your watch records it. The question is whether you're doing anything with it.