A few limited studies do support taking magnesium for sleep, said Dr Sujay Kansagra, a sleep specialist at Duke Health. But whether it’s better than melatonin, or whether it helps with sleep at all, is still up for debate, he said.
What does the research suggest?
Magnesium is an essential nutrient that plays various roles in the body, including helping to regulate blood pressure and blood sugar and to control nerve and muscle function.
But little research has been done on whether the mineral helps with sleep, Martin said. And the studies that do exist, she added, are not high-quality.
In one trial published in 2025, researchers split 155 healthy adults with poor sleep into two groups: one that took 250mg of magnesium glycinate within 30 to 60 minutes before bed, and another that took a placebo. The researchers reported that while the magnesium group had “significantly greater” improvements in their insomnia symptoms than the placebo group, those improvements were modest.
In another study, published in 2021, researchers asked nearly 4000 people aged 18 to 30 about their sleep and diet habits at various times across 20 years. The scientists found that, compared with those who reported consuming the least magnesium, those who reported consuming the most (through food or supplements) were 36% less likely to sleep less than seven hours per night and were 30% more likely to report higher-quality sleep. However, those improvements disappeared when they looked at only people with depression.
These findings supported the idea that magnesium might improve sleep in some people, said Dr Ka Kahe, a professor of preventive medicine and epidemiology at Columbia University who led the study. But they couldn’t prove that magnesium itself helped the participants sleep better, he said. Those who consumed the most magnesium, for instance, may have been healthier in other ways that improved their sleep, he said. And the results suggested that the benefits did not apply to everybody.
In a 2022 review of nine studies on how magnesium influences sleep, researchers concluded that while some research showed a link between magnesium supplements and better sleep, randomised clinical trials (which can prove cause and effect) had more mixed results.
In other words, Kansagra said, “the hype is much, much further ahead than objective science”.
Still, there is a plausible explanation for how magnesium might improve sleep, said Kelly Glazer Baron, director of the behavioural sleep medicine programme at the University of Utah.
Magnesium may influence certain sleep-related neurotransmitters in the nervous system in ways that increase feelings of calmness and decrease muscle tension and restlessness, she said.
It’s also possible that people who sleep better after taking magnesium supplements are experiencing a placebo effect, Kansagra said. Meaning, the act of taking a supplement alone may promote better sleep.
Is magnesium ‘better’ for sleep than melatonin?
Scientists don’t know whether one supplement is better than the other, in part because no rigorous studies have compared them directly.
That said, the research on how melatonin affects sleep is much more robust than the research on magnesium, Kansagra said. We have good evidence showing that melatonin supplements can help with certain sleep disorders, such as circadian rhythm sleep-wake disorders and jet lag. But most sleep experts don’t recommend taking melatonin for insomnia or other sleep issues, in part because it doesn’t solve the root of the problem, Kansagra said.
As for whether you should take magnesium for sleep, Kansagra didn’t recommend it because the evidence was lacking. But he said he was fine with patients trying it if they were healthy (and could afford it) since there hadn’t been major safety issues with taking magnesium at recommended doses. He also recommended taking it if you have a true magnesium deficiency.
Magnesium supplements are sold as pills, gummies, powders and creams. And they have several formulations, like magnesium citrate, magnesium glycinate, magnesium oxide and magnesium chloride, which all behave slightly differently in the body.
Most people prefer magnesium glycinate or magnesium L-threonate for sleep, Baron said, because they aren’t as likely to cause the gastrointestinal side effects including diarrhoea, nausea and cramping that magnesium citrate and magnesium oxide can. Some people take magnesium citrate as a laxative, Kansagra said.
As with all supplements, magnesium supplements are not regulated for safety and effectiveness the way prescription drugs are. So it’s a good idea to buy supplements that have been vetted by third-party certification programs like the US Pharmacopeia or NSF.
The bigger risk with taking magnesium (or melatonin) is that it might mask a serious sleep condition that requires treatment, Kansagra said. If you have sleep apnoea or insomnia, for instance, taking supplements to sleep better might delay a diagnosis or treatment that could prevent future health issues.
If you’re having trouble sleeping, it’s always best to consult a doctor before reaching for a supplement, Kansagra said.
This article originally appeared in The New York Times.
Written by: Caroline Hopkins Legaspi
©2026 THE NEW YORK TIMES




