Does magnesium help with poor sleep and muscle cramps, and which form should you take?
Magnesium probably does not help with muscle cramps, but in older adults with sleep problems it may shorten the time it takes to fall asleep by a small amount. Whether you will actually benefit, and which form is best to take, has not yet been adequately studied.
Muscle cramps are the most thoroughly researched application of magnesium supplements, and the conclusion is clear: it does not demonstrably help. Two large Cochrane reviews found that magnesium reduced the frequency of nocturnal leg cramps in older adults by an average of just 0.18 cramps per week compared with placebo, a difference that is clinically meaningless. That finding applies to adults without a deficiency.
For muscle cramps during pregnancy the picture is less clear. An older systematic review saw a hint of benefit with magnesium lactate or citrate, but more recent randomised trials and a meta-analysis found no significant effect. The 2020 Cochrane update rates the pregnancy studies as unreliable due to methodological shortcomings. No firm conclusion can therefore be drawn here.
For sleep problems there is a cautiously positive signal. A systematic review and meta-analysis in older adults with insomnia found that magnesium reduced sleep-onset time by an average of 17 minutes compared with placebo. Total sleep time did not improve significantly. However, the three randomised studies included in this analysis all had a moderate to high risk of bias, and the researchers themselves conclude that the evidence is too weak for strong recommendations.
Which form works best? Magnesium oxide, the inexpensive variant found in many supplements, was shown in one double-blind placebo-controlled study in athletes not to raise magnesium levels in muscle cells, blood or serum at all, even after three weeks of daily use. This suggests that absorption of this form is poor. The studies that did show a positive signal for sleep partly used other forms (such as magnesium citrate and oxide in combination). Which specific form works best for sleep cannot be determined from the available studies.
Side effects are mild but real. Up to 37% of magnesium users in some studies experienced diarrhoea or nausea, compared with around 14% in the placebo group. Serious side effects or discontinuations did not occur more often than in the placebo group.
Based on two Cochrane reviews (PMID 22972143, 32956536), one meta-analysis on sleep (PMID 33865376), one systematic review on pregnancy (PMID 11869565), one randomised trial in pregnant women (PMID 31923242), one meta-analysis on pregnancy (PMID 34247796), one randomised trial in athletes (PMID 9813870), and additional observational data (PMID 38215424).
Does magnesium really help you sleep better and keep your mind sharp?
Magnesium may help with sleep problems, but the evidence is still too limited and inconsistent to make firm claims. If you want to try it, supplements at normal doses are safe; in any case, make sure you get enough through your diet.
Is it better to take magnesium in the evening?
Evening intake sounds logical given magnesium's role in melatonin and sleep, but there is no research that 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.
Does pain make me sleep worse, and what can you do about it?
Pain and poor sleep reinforce each other, with sleep deprivation typically aggravating pain more than the other way around. The treatment with the strongest evidence is cognitive behavioural therapy for insomnia (CBT-i), which demonstrably improves sleep, although the pain does not automatically disappear as a result.
How much melatonin should you take to sleep better?
For most adults, 4 mg appears to have the greatest effect, but it should be taken 2 to 3 hours before bedtime; if you are older than 55, the extended-release formulation (2 mg) is the only one officially recommended.
Which form of magnesium is best to take?
Magnesium citrate has the strongest evidence for good absorption in humans; if you want to take a magnesium supplement, an organic form such as citrate is a reasonable choice, but pay attention to product quality as well, because it varies considerably.
Why do you still get muscle cramps despite taking magnesium?
Magnesium has no demonstrable effect on the most common nocturnal cramps, and with exercise-related cramps the cause likely lies elsewhere. If the cramps persist, discuss with your doctor whether there is another explanation.