In short
Magnesium might help a little, but the evidence is weak. In small trials of older adults with insomnia, it shortened the time to fall asleep by about 17 minutes, and the studies were low quality. No type of magnesium has been shown to be best for sleep. Up to 350 mg a day from supplements is considered safe for most adults.
On this page
Does magnesium help you sleep?
Possibly, by a small amount, and the research isn’t strong enough to be sure.
The best summary is a meta-analysis of three randomised trials in 151 older adults with insomnia. People taking magnesium fell asleep about 17 minutes faster than those taking placebo. Total sleep time went up by 16 minutes, which wasn’t a statistically reliable difference. The authors rated all three trials as being at moderate to high risk of bias and the evidence as low to very low quality.1
One of those trials gave 46 older adults magnesium or placebo for eight weeks. The magnesium group reported better sleep on several measures.2
A broader review looked at both kinds of evidence. Studies that simply observe people found that those with higher magnesium levels or intakes tended to sleep better. Randomised trials, which are the fairer test, gave uncertain results.3
So magnesium is a reasonable thing to try, with modest expectations. It is not a treatment for ongoing insomnia.
Why might it work?
Magnesium is involved in how nerves and muscles work, and in the brain’s calming signals. People who are low in magnesium may be the ones who benefit, which could explain why results are mixed: most trials didn’t check magnesium levels first.3,4
Sleep still not right?
Talk it through with an Australian doctor online. No referral needed.
Which magnesium is best for sleep?
No form has been shown to be better than another for sleep. Trials have used different types and doses, and none has compared them head to head.4
What is known is how well each is absorbed and tolerated. Forms that dissolve well in liquid, such as magnesium citrate, are absorbed more completely than magnesium oxide. Magnesium oxide is the type most likely to loosen the bowels.6 Magnesium glycinate is often marketed for sleep, but no trial has shown it works better than other forms.4
What about magnesium for sleep and anxiety?
A 2024 systematic review found that most small trials reported some improvement in self-rated anxiety or sleep with magnesium, but the studies differed so much in dose, type and who was included that firm conclusions weren’t possible.4
How much is safe?
- The upper limit for magnesium from supplements is 350 mg a day for adults. That limit doesn’t include magnesium from food6
- The most common side effects are diarrhoea, nausea and stomach cramps, particularly with larger doses6
- You can’t get too much magnesium from food, because healthy kidneys clear the excess. Supplements, antacids and laxatives containing magnesium are what cause problems7
- If you have kidney disease, don’t take magnesium without medical advice
- Magnesium can interfere with some antibiotics and bone medicines. Check with a pharmacist if you take regular medicines6
Getting magnesium from food
Leafy green vegetables, nuts, seeds, legumes and wholegrains are the main sources. A diet with plenty of these usually provides enough.7
Does magnesium help leg cramps at night?
It is widely taken for this, but a Cochrane review concluded magnesium is unlikely to give meaningful relief from muscle cramps in older adults.5 See leg cramps at night.
What works better for sleep
For long-term trouble sleeping, the treatment with the strongest evidence is cognitive behavioural therapy for insomnia, which sleep specialists recommend as the first choice.8 Good sleep habits and the steps in how to fall asleep fast are worth doing either way.
When to see a doctor
See a doctor if you have had trouble sleeping at least three nights a week for more than a few weeks, if you snore loudly or are sleepy during the day, or if poor sleep is affecting your mood or work.
Next step: talk to a doctor
Answer a few quick questions and you’ll get an email about your eligibility. A consultation doesn’t guarantee any particular treatment.
References
- Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a Systematic Review & Meta-Analysis. BMC Complement Med Ther. 2021;21(1):125.
- Abbasi B, Kimiagar M, Sadeghniiat K, et al. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. J Res Med Sci. 2012;17(12):1161-9.
- Arab A, Rafie N, Amani R, et al. The Role of Magnesium in Sleep Health: a Systematic Review of Available Literature. Biol Trace Elem Res. 2023;201(1):121-128.
- Rawji A, Peltier MR, Mourtzanakis K, et al. Examining the Effects of Supplemental Magnesium on Self-Reported Anxiety and Sleep Quality: A Systematic Review. Cureus. 2024;16(4):e59317.
- Garrison SR, Korownyk CS, Kolber MR, et al. Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev. 2020;9(9):CD009402.
- National Institutes of Health (US), Office of Dietary Supplements. Magnesium: fact sheet for consumers.
- healthdirect. Magnesium and your health.
- Edinger JD, Arnedt JT, Bertisch SM, et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med. 2021;17(2):255-262.
This guide is general information, not medical advice. It doesn’t replace a consultation with a doctor who knows your history. In an emergency, call 000.