Image generated with AI for nelaybanerjjee.com
Magnesium at bedtime is said to help you fall asleep faster and sleep longer. The newest research, including a 2025 trial and a 2026 review of 12 trials, points to a smaller effect.
Here is the short answer. Magnesium gives a small benefit at best, and only in some groups. Older adults with insomnia fell asleep about 17 minutes faster than on placebo, based on the pooled result of 3 small trials. Adults aged 18 to 65 with poor sleep saw a small drop in insomnia scores in one 2025 trial. The 2026 review concluded the evidence does not support magnesium as a routine insomnia treatment.
Where the Magnesium and Sleep Idea Came From
The idea comes from studies that link magnesium levels to sleep. A 2023 review of 9 studies with 7,582 adults found magnesium status was tied to sleep duration, daytime sleepiness and snoring. Those links came from studies that only measured people as they were, without giving anyone a pill. So they cannot show that magnesium causes better sleep.
The randomized trials in that review contradicted each other. In a randomized trial, one group gets the supplement and another gets a placebo, a dummy pill. That design can show cause. The authors called the link between magnesium supplements and sleep disorders uncertain. They asked for larger trials lasting longer than 12 weeks.
A 2024 review suggested the benefit may be greatest in people with low magnesium status. Its studies were small and varied widely, so treat this as an idea still to be tested.
What the Research Found
What It Found
The clearest result is in older adults with insomnia. A 2021 meta-analysis pooled 3 trials with 151 older adults. A meta-analysis combines several trials into one overall estimate. Oral magnesium cut the time it takes to fall asleep by 17.36 minutes compared with placebo.
One of those trials gave 46 older adults with primary insomnia 500 mg of magnesium a day for 8 weeks. Compared with placebo, they fell asleep faster, slept longer and scored better on a short insomnia questionnaire. With only 46 people, this is weak evidence.
The 2025 trial gave 155 adults aged 18 to 65 with poor sleep either magnesium bisglycinate or placebo for 4 weeks. Bisglycinate is a form of magnesium that comes with glycine built in. The dose was 250 mg of magnesium itself, not the weight of the whole compound. Insomnia scores fell 3.9 points on magnesium and 2.3 points on placebo. The authors called the 1.6-point gap small.
What It Did Not Show

In the older adult meta-analysis, total sleep time rose 16 minutes, but chance could explain that result. All 3 trials had moderate to high risk of bias, meaning design flaws could skew the results. Evidence quality was low to very low. The authors said the research is not good enough for doctors to give well-informed advice. A correction to the paper was published in 2024.
The 46-person trial relied mostly on self-reported measures. In the 2025 trial, no other sleep, sleepiness, fatigue or mood scale differed from placebo. Every outcome was self-reported.
The 2026 review of 12 trials of magnesium on its own found mixed results. This held across questionnaires, wearables, EEG (brain wave recordings) and actigraphy (a wrist device that tracks movement). Certainty was low to very low. Some adults may see modest gains on some self-reported measures, the authors said, but routine use for insomnia is not supported.
In a trial funded by AIDP Inc., 80 adults aged 35 to 55 with sleep problems took 1 g a day of magnesium L-threonate for 21 days. Three authors were tied to the funder. Insomnia scores did not differ from placebo, and the authors noted a strong placebo response. Oura ring scores for deep and REM sleep favored magnesium, but time to fall asleep was slightly longer on magnesium. Treat this single, company-funded trial as early evidence.
The NIH’s NCCIH says there is very little research on magnesium supplements for insomnia and other sleep disorders, and “there isn’t enough rigorous scientific evidence to determine whether they are effective.”
What About Leg Cramps at Night?
The evidence is split, and the stronger review is negative for older adults. In a trial of 175 people with nighttime leg cramps, 226 mg of magnesium oxide monohydrate (a form of magnesium oxide) at bedtime for 60 days cut cramp episodes more than placebo (3.4 fewer versus 2.6 fewer). Cramps were shorter, and sleep quality improved more than on placebo. But cramps fell clearly on placebo too, and the trial was registered only after it had been run.
A Cochrane review, a strict type of review that pools trials, looked at 5 studies with 307 older adults. Magnesium did not reduce how often cramps happened (moderate certainty). The authors concluded it is unlikely to cut how often or how badly older adults get cramps. The review did not report sleep outcomes, and evidence for cramps in pregnancy was conflicting.
How to Use Magnesium for Sleep
Start with food, keep any supplement within the official limit and give it a fair test of at least 4 weeks. Expect a small effect at most, because the overall evidence is low quality.
1. Start With Food

The NHS says adults aged 19 to 64 need 300 mg a day (men) or 270 mg a day (women), and a varied diet should provide it. Spinach, nuts and whole wheat bread are good sources. Magnesium from food does not count toward the US upper limit for supplements.
2. Check Whether You Match a Group That Was Studied
Some benefit showed up in older adults with insomnia (low to very low quality evidence) and in adults with self-reported poor sleep (small effect, one trial). A single-blind trial of 290 people with diabetes and insomnia reported lower insomnia scores. But the summary gives no effect sizes and does not name the magnesium form. In people with fibromyalgia, a long-term pain condition, 100 mg of magnesium chloride a day for 1 month did not change sleep. That summary does not give the number of people, so treat it as weak evidence.
3. Choose a Form
Forms differ in how much your body absorbs. The NIH says magnesium aspartate, citrate, lactate and chloride tend to be absorbed better than oxide and sulfate. Forms that dissolve well in liquid are absorbed better. The studies behind this are small. The 2025 trial, the one that found a small benefit, used bisglycinate.
| Form and dose tested | Who was studied | Result | How confident |
|---|---|---|---|
| Bisglycinate, 250 mg magnesium a day | Adults 18 to 65 with poor sleep, 4 weeks | Small drop in insomnia score | Moderate, one trial |
| Magnesium L-threonate, 1 g a day | Adults 35 to 55 with sleep problems, 21 days | No difference in insomnia score | Early, company-funded |
| Magnesium oxide monohydrate, 226 mg at bedtime | People with nighttime leg cramps, 60 days | Fewer cramps, better sleep quality | Moderate, one trial |
| Magnesium chloride, 100 mg a day | People with fibromyalgia, 1 month | No change in sleep | Weak |
4. Keep the Dose Within the Upper Limit
The upper limit is the daily cap health agencies set for magnesium from supplements. In the US it is 350 mg for adults, counting supplements and medicines but not food. In the EU it is 250 mg for adults, pregnant and breastfeeding women, and children from age 4, based on the risk of diarrhea. The NHS says 400 mg or less a day from supplements is unlikely to cause harm. More than 400 mg in the short term can cause diarrhea.
Several sleep trials used doses above both the US and EU limits, including the 500 mg trial in older adults. Do not copy that dose on your own. The 250 mg dose from the 2025 trial sits at the EU limit and under the US one. If you take medicines or have a health condition, speak with a qualified healthcare professional first.
5. Decide When to Take It
There is no tested best time for sleep. The only clear timing in this evidence comes from the cramp trial, which used one dose at bedtime. The insomnia trial summaries do not say whether time of day matters.
6. Give It 4 to 8 Weeks
A few nights is too short to judge. The 2025 trial ran for 4 weeks and the 46-person trial ran for 8, so the upper end rests on weak evidence. Trials longer than 12 weeks are still missing, so long-term effects are not well studied.
7. Know Which Combinations Were Tested
No combination has good evidence behind it. Glycine came built into the bisglycinate pill, so that trial cannot tell the two apart. In the diabetes trial, magnesium, potassium and both together each changed blood cortisol (a stress hormone) and melatonin (a hormone tied to sleep timing). With no effect sizes, we cannot say the pair beat magnesium alone. A blend of tryptophan, glycine, magnesium, tart cherry and L-theanine helped 16 young adults fall asleep faster over 3 days. That is weak evidence, and with five ingredients the effect cannot be credited to magnesium.
No study here tested magnesium with melatonin or zinc. A 2022 meta-analysis of 31 supplement trials (weak evidence) found melatonin improved self-reported sleep quality, but it had too little magnesium data to include magnesium. An IV drip of magnesium with ketamine did not change sleep in 20 people with nerve pain. That was one infusion in a small group, not a pill.
8. Track Whether It Is Working
For one week before you start, note how long it takes you to fall asleep and how long you sleep. Keep noting both for 4 weeks on magnesium, then compare. People on placebo also improved in the 2025 trial, so some change can come without magnesium. Wearables can mislead too. In the L-threonate trial, ring scores favored magnesium while insomnia questionnaire scores did not differ from placebo.
9. Adjust for Your Situation
- If you are an older adult with leg cramps, magnesium is unlikely to reduce them, based on a Cochrane review with moderate certainty.
- If you take bisphosphonates (drugs for bone thinning) or some antibiotics, they are not well absorbed when taken too soon before or after high-magnesium products. Ask a pharmacist how far apart to take them.
- If you have kidney disease, are pregnant or breastfeeding, or are thinking of giving it to a child, none of the sleep trials here studied you. Speak with a qualified healthcare professional first.
- Watch for diarrhea. In the Cochrane cramp trials, diarrhea and other gut side effects occurred in 11% to 37% of people on magnesium versus 10% to 14% on control.
A Quick Decision Table
| Your situation | What the evidence suggests | How confident |
|---|---|---|
| Older adult with insomnia | You may fall asleep a little faster; longer sleep was not shown | Low to very low |
| Adult 18 to 65 with poor sleep | Small drop in insomnia score with bisglycinate | Moderate, one trial |
| Nighttime leg cramps | One trial found fewer cramps and better sleep; a Cochrane review found no cramp benefit in older adults | Moderate |
| Diabetes with insomnia | One trial reported lower insomnia scores, with no effect sizes | Limited |
| Fibromyalgia | No change in sleep | Weak |
| On bisphosphonates or some antibiotics | Space the doses apart and ask a pharmacist how far | Strong, official guidance |
Common Mistakes
- Copying a trial dose that is above the upper limit, such as 500 mg a day.
- Expecting a large effect when the best trials show small changes.
- Judging magnesium after a few nights instead of at least 4 weeks.
- Crediting magnesium for the effect of a mixed sleep blend.
- Taking magnesium too close to bisphosphonates or some antibiotics.
Frequently Asked Questions
Does Magnesium Help You Stay Asleep Longer?
Not clearly. In older adults with insomnia, the rise in total sleep time could be chance. The 2026 review found mixed results across sleep measures in adults.
Does This Apply to Younger Adults?
Only weakly. In adults aged 18 to 65 with poor sleep, bisglycinate helped on one questionnaire and not on the others. In adults aged 35 to 55, L-threonate did not beat placebo on insomnia scores.
Is It Safe to Take Every Night?
The NHS says 400 mg or less a day from supplements is unlikely to cause harm, but the US and EU limits are lower. Diarrhea is the main side effect. Long-term nightly use is not well studied.
Should I Test My Magnesium Level First?
One weak review suggested people with low magnesium status may benefit most, but this is unproven. If you think you are low, ask a qualified healthcare professional rather than dosing above the limit.
Your Next Step
Run a 4-week test, the same length as the 2025 trial. Log your time to fall asleep for one week first. Then take a dose at or under your country’s upper limit (250 mg in the EU, 350 mg in the US) and compare at the end. If you take medicines or have kidney disease, speak with a qualified healthcare professional before you start.
Research Papers & References
- 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 Erratum: https://doi.org/10.1186/s12906-024-04721-w
- Lopresti AL, Smith SJ, Drummond PD (2026). Magnesium Supplementation for Sleep in Adults: A Systematic Review of Randomized Controlled Trials. Journal of dietary supplements, 23(5), 553-581. https://doi.org/10.1080/19390211.2026.2719670
- 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
- Chan V, Lo K (2022). Efficacy of dietary supplements on improving sleep quality: a systematic review and meta-analysis. Postgraduate medical journal, 98(1158), 285-293. https://doi.org/10.1136/postgradmedj-2020-139319
- Barna O, Lohoida P, Holovchenko Y, Bazylevych A, Velychko V, Hovbakh I, et al. (2021). A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps. Nutrition journal, 20(1), 90. https://doi.org/10.1186/s12937-021-00747-9
- Khalid S, Bashir S, Mehboob R, Anwar T, Ali M, Hashim M, et al. (2024). Effects of magnesium and potassium supplementation on insomnia and sleep hormones in patients with diabetes mellitus. Frontiers in endocrinology, 15, 1370733. https://doi.org/10.3389/fendo.2024.1370733
- Macian N, Dualé C, Voute M, Leray V, Courrent M, Bodé P, et al. (2022). Short-Term Magnesium Therapy Alleviates Moderate Stress in Patients with Fibromyalgia: A Randomized Double-Blind Clinical Trial. Nutrients, 14(10). https://doi.org/10.3390/nu14102088
- Langan-Evans C, Hearris MA, Gallagher C, Long S, Thomas C, Moss AD, et al. (2023). Nutritional Modulation of Sleep Latency, Duration, and Efficiency: A Randomized, Repeated-Measures, Double-Blind Deception Study. Medicine and science in sports and exercise, 55(2), 289-300. https://doi.org/10.1249/MSS.0000000000003040
- Pickering G, Pereira B, Morel V, Corriger A, Giron F, Marcaillou F, et al. (2020). Ketamine and Magnesium for Refractory Neuropathic Pain: A Randomized, Double-blind, Crossover Trial. Anesthesiology, 133(1), 154-164. https://doi.org/10.1097/ALN.0000000000003345
- National Center for Complementary and Integrative Health (NIH) (2024). In the News: Magnesium Supplements for Sleep Disorders. NCCIH (U.S. National Institutes of Health). https://www.nccih.nih.gov/health/in-the-news-magnesium-supplements-for-sleep-disorders
- Abbasi B, Kimiagar M, Sadeghniiat K, Shirazi MM, 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/
- Garrison SR, Korownyk CS, Kolber MR, Allan GM, Musini VM, Sekhon RK, Dugré N (2020). Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews, 2020(9), CD009402. https://doi.org/10.1002/14651858.CD009402.pub3
- Schuster J, Cycelskij I, Lopresti A, Hahn A (2025). Magnesium Bisglycinate Supplementation in Healthy Adults Reporting Poor Sleep: A Randomized, Placebo-Controlled Trial. Nature and Science of Sleep, 17, 2027-2040. https://doi.org/10.2147/NSS.S524348
- Hausenblas HA, 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
- NIH Office of Dietary Supplements (n.d.). Magnesium: Fact Sheet for Health Professionals. National Institutes of Health, Office of Dietary Supplements. https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
- NIH Office of Dietary Supplements (n.d.). Magnesium: Fact Sheet for Consumers. National Institutes of Health, Office of Dietary Supplements. https://ods.od.nih.gov/factsheets/Magnesium-Consumer/
- European Food Safety Authority (EFSA) (2024). Overview on Tolerable Upper Intake Levels as derived by the Scientific Committee on Food (SCF) and the EFSA Panel on Dietetic Products, Nutrition and Allergies (NDA). EFSA. https://www.efsa.europa.eu/sites/default/files/2024-05/ul-summary-report.pdf
- NHS (n.d.). Vitamins and minerals: Others (Magnesium). NHS (nhs.uk). https://www.nhs.uk/conditions/vitamins-and-minerals/others/
- Rawji A, Peltier MR, Mourtzanakis K, Awan S, Rana J, Pothen NJ, Afzal S (2024). Examining the Effects of Supplemental Magnesium on Self-Reported Anxiety and Sleep Quality: A Systematic Review. Cureus, 16(4), e59317. https://pmc.ncbi.nlm.nih.gov/articles/PMC11136869/



