longevitywatch

Does magnesium help with poor sleep and muscle cramps, and which form should you take?

Preliminary evidence

Magnesium has no demonstrable benefit for ordinary muscle cramps, and for sleep problems the evidence is too weak to support a recommendation. If you suspect you have a deficiency, have it checked by your GP.

Magnesium does not help with ordinary nocturnal muscle cramps. A review of eleven studies concluded this with high certainty of evidence: how often cramps occurred, how severe they were, and how long they lasted did not differ from a placebo. For cramps during pregnancy the studies contradict each other, making the evidence too uncertain for a recommendation.

For sleep the picture is more nuanced. In older people with sleep problems, magnesium reduced the time it took to fall asleep by an average of 17 minutes compared with a placebo, across three small studies involving 151 participants. The quality of evidence was low to very low, however. A broader analysis of twelve studies concluded that magnesium cannot currently be recommended as a standard treatment. If you still want to try it for sleep, tablets or capsules containing magnesium citrate, magnesium oxide, or magnesium L-threonate are the most studied forms. On the label, look for 'magnesium (elemental)' with the dose in milligrams per tablet: it is that elemental amount that counts, not the weight of the entire salt compound. A range of 320 to 500 mg of elemental magnesium per day, maintained for at least 8 to 12 weeks, is what was used in research. Whether the salt form on the label is organic or inorganic does not demonstrably matter for sleep, although magnesium oxide consistently scores worse on absorption.

A large population study found an association between low magnesium status and sleep apnoea, but that is an association finding: it does not prove that taking magnesium improves sleep apnoea. In people with diabetes, one study showed improvement in sleep complaints; discuss it with your doctor.

Gastrointestinal complaints, especially diarrhoea, occurred in 11 to 37 percent of magnesium users in the cramp studies, compared with 10 to 14 percent in the placebo group. In people with kidney problems, magnesium can accumulate in the blood, so consult a doctor first.

The evidence
7 studies · 3 meta-analyses · 2 randomised trials · ≈ 21,630 participants

This answer is based on multiple systematic reviews of randomised studies, including one Cochrane review on muscle cramps and two broader reviews on sleep. The researchers rated the quality of evidence for sleep as low to very low, and all sleep studies had a moderate to high risk of bias. The cramp review reported high certainty of evidence for the absence of an effect for ordinary (idiopathic) cramps in older adults; for pregnancy-related cramps, a high risk of bias applied in five of the six studies.

Last checked: October 2026 · how this was judged
Related answers

Does magnesium really help you sleep better?

Magnesium may be worth trying for sleep problems, but the evidence is limited and the studies are partly contradictory. At normal doses it is safe; in any case, make sure you get enough through your diet.

Moderate evidence

When should you take magnesium for sleep?

Take magnesium about an hour before bedtime, but do not expect a guaranteed effect: the evidence is thin and a substantial placebo effect is likely playing a role.

Preliminary evidence

Does magnesium glycinate help you sleep better?

Magnesium may offer some benefit for sleep in certain people who are deficient or have a medical condition, but this has not been demonstrated for healthy people without a deficiency. If you have had poor sleep for years, first discuss with your doctor whether other causes may be involved.

Preliminary evidence

Is it better to take magnesium in the evening?

Evening intake sounds logical given magnesium's role in melatonin and sleep, but no research directly compares evening versus morning use. Take magnesium at the time that is easiest for you to stick to consistently, preferably with a meal to limit stomach complaints.

Preliminary evidence

Which form of magnesium is best to take?

Magnesium citrate has the strongest evidence for absorption into the body. Magnesium oxide, the cheapest option, demonstrably performs the worst and is best avoided.

Moderate evidence

Why do you still get muscle cramps despite taking magnesium?

Magnesium has no demonstrable effect against the most common muscle cramps, neither in older adults nor in athletes. If the cramps persist, discuss with your doctor whether there is another explanation.

All Magnesium answers on “What works” →
Related research
20 Oct
Sleep after 50: what changes and what you can do about it
11 Oct
Winter sleepiness has a biological circuit in the brain
28 Sep
Fragmented sleep erases memories via dopamine circuit
Don't see your question?
Ask it and we'll look it up for you.
Ask a question →
Newsletter

Stay in the loop

Every Thursday, the most important longevity research in your inbox, focused on what you follow.