Does magnesium help you sleep?
In small trials, older adults fell asleep about 17 minutes faster on magnesium, but the evidence is low quality. What it shows on forms, doses and food.
Which sleep stealers apply to you? Take the one-minute test

Maybe a little, but the evidence is thin. A handful of small trials, mostly in older adults with insomnia, found that people fell asleep somewhat faster with magnesium, and the reviews that pooled them rated the evidence as low quality. If you eat few nuts, seeds, beans and whole grains, getting more magnesium from food is the better first step.
Key takeaways
- Only three placebo-controlled trials in older adults made it into the main review, with 151 people in total.
- People fell asleep about a quarter of an hour faster with magnesium, but total sleep time didn’t change clearly.
- Observational studies link magnesium to better sleep, while trials disagree.
- The best-known trial of magnesium L-threonate, the form marketed for sleep and the brain, was funded by the company that distributes it.
- Supplements above 350 milligrams a day can cause diarrhea and aren’t recommended without a doctor.
What do studies say about magnesium and sleep?
Studies on magnesium and sleep show less than the shelves suggest. A 2021 review looked for every randomized trial that compared magnesium with a placebo in older adults with insomnia. It found three, with 151 people in three countries. Pooled together, people with magnesium fell asleep about 17 minutes faster. Their total sleep time rose by about 16 minutes, a difference too uncertain to count. All three trials had a moderate to high risk of bias, and the reviewers rated the evidence as low to very low quality (Mah & Pitre, 2021).
The best known of the three was done in Tehran with 46 older adults with insomnia, who took 500 milligrams of magnesium or a placebo for eight weeks. The magnesium group scored better on an insomnia questionnaire, fell asleep faster and had a higher sleep efficiency in their sleep logs (Abbasi et al., 2012). Small trial, self-reported sleep, one population.
A broader 2023 review of nine studies with 7,582 adults summed it up: observational studies suggest that people with more magnesium sleep better, but the randomized trials gave contradictory results (Arab et al., 2023). That is the classic pattern of a nutrient that goes along with a healthy diet: people who eat lots of nuts, beans and whole grains also do many other things that help sleep.
Which type of magnesium is best for sleep?
Independent evidence doesn’t yet show that any form of magnesium works better for sleep. Magnesium L-threonate is sold as the form that reaches the brain, and in a trial with 80 adults aged 35 to 55 with sleep complaints, three weeks of it improved deep and REM sleep scores on a sleep-tracking ring and several questionnaire measures compared with placebo (Hausenblas et al., 2024). The study was funded by AIDP, the company that has distributed this form of magnesium under a brand name, and the sleep-stage scores came from a consumer ring, which is not the same as a sleep lab (how well such devices judge sleep stages is covered in Are sleep trackers accurate?).
Glycinate, citrate and oxide are other common forms. I found no independent trial that compared them head to head for sleep.
Should you take magnesium for sleep?
Taking magnesium for sleep is a reasonable experiment if you have mild sleep trouble and no kidney disease, as long as you keep your expectations modest. The reviewers of the older-adult trials made the same point: the evidence is poor, but magnesium is cheap and widely available (Mah & Pitre, 2021). For adults, the US upper limit for magnesium from supplements is 350 milligrams a day; higher doses often cause diarrhea, and people with kidney problems should only take magnesium with their doctor’s approval (Institute of Medicine, 1997).
My honest view: if magnesium helps you, it is probably helping a little at the margin. Another popular sleep aid with a narrow evidence base is covered in Do weighted blankets help you sleep?. The things with much stronger evidence for sleep are a regular rhythm, less caffeine late in the day and less alcohol in the evening.
How much magnesium do you need, and which foods have it?
Adults need roughly 310 to 420 milligrams a day, depending on age and sex, and good sources include green leafy vegetables such as spinach, nuts and whole grains (Institute of Medicine, 1997). Those same foods bring fiber too (how much you need), and nuts have their own trials for the heart, as the walnut article explains.
What I’d do
- Add a handful of nuts or seeds and a portion of beans or whole grains to your day first.
- Try a supplement for a few weeks at no more than 350 milligrams a day if you want to experiment, and stop if nothing changes.
- Ask your doctor first if you have kidney disease or take other medication regularly.
- Fix the bigger levers before the small ones, starting with a regular bedtime.
- Check the evening coffee and the nightcap.
- Compare the evidence before you buy a sleep supplement; melatonin has its own surprises, covered in Do melatonin gummies work? A caffeine-free warm drink is the gentler experiment; see Does chamomile tea help you sleep?
Frequently asked questions
Does a magnesium bath or spray work? I found no good trial showing that magnesium through the skin improves sleep.
Is it safe to take magnesium every night? The US upper limit for magnesium from supplements is 350 milligrams a day for adults. Higher doses often cause diarrhea, and people with kidney problems should only take it with their doctor’s approval (Institute of Medicine, 1997).
Can I have too little magnesium without knowing? Possibly, since a mild shortfall rarely causes obvious symptoms, and a standard blood test reflects only a small part of the magnesium in your body (Institute of Medicine, 1997). That is another reason to start with food.
Sources
- Abbasi, B., Kimiagar, M., Sadeghniiat, K., Shirazi, M. M., Hedayati, M., & Rashidkhani, B. (2012). The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. Journal of Research in Medical Sciences, 17(12), 1161–1169. https://pmc.ncbi.nlm.nih.gov/articles/PMC3703169/
- Arab, A., Rafie, N., Amani, R., & Shirani, F. (2023). The role of magnesium in sleep health: A systematic review of available literature. Biological Trace Element Research, 201(1), 121–128. https://doi.org/10.1007/s12011-022-03162-1
- Hausenblas, H. A., Lynch, T., Hooper, S., Shrestha, A., Rosendale, D., & Gu, J. (2024). Magnesium-L-threonate improves sleep quality and daytime functioning in adults with self-reported sleep problems: A randomized controlled trial. Sleep Medicine: X, 8, 100121. https://doi.org/10.1016/j.sleepx.2024.100121 (Funded by AIDP Inc.)
- Institute of Medicine. (1997). Dietary reference intakes for calcium, phosphorus, magnesium, vitamin D, and fluoride. National Academies Press. https://doi.org/10.17226/5776
- Mah, J., & Pitre, T. (2021). Oral magnesium supplementation for insomnia in older adults: A systematic review & meta-analysis. BMC Complementary Medicine and Therapies, 21(1), 125. https://doi.org/10.1186/s12906-021-03297-z

