For decades, melatonin has been one of the most popular supplements for sleep. And it still is, with sales of sleep supplements containing the hormone nearing $800 million in 2025, according to the market research company NBJ.
But over the past few years, more and more people have become interested in taking the mineral magnesium for sleep. Some on social media claim that it offers a deeper, more restorative rest than melatonin, minus the morning grogginess.
In 2025, according to NBJ, sales of sleep supplements containing magnesium increased by about 17 percent — while sales of melatonin-containing sleep supplements rose by about 5 percent.
This new interest in magnesium might stem in part from recent “bad press” surrounding melatonin, said Jennifer Martin, a clinical psychologist who studies sleep disorders at Florida International University. Some melatonin supplements have been found to contain much higher levels of the hormone than advertised, for instance. And there have been some scary headlines linking melatonin supplements to heart risks.
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, Dr. 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 250 milligrams 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 4,000 people ages 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 percent less likely to sleep less than seven hours per night and were 30 percent 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, randomized clinical trials (which can prove cause and effect) had more mixed results.
In other words, Dr. 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 behavioral sleep medicine program 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, Dr. 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, Dr. 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, Dr. Kansagra said.
As for whether you should take magnesium for sleep, Dr. 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, Dr. Baron said, because they aren’t as likely to cause the gastrointestinal side effects like diarrhea, nausea and cramping that magnesium citrate and magnesium oxide can. Some people take magnesium citrate as a laxative, Dr. 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 U.S. Pharmacopeia or NSF.
The bigger risk with taking magnesium (or melatonin) is that it might mask a serious sleep condition that requires treatment, Dr. Kansagra said. If you have sleep apnea 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, Dr. Kansagra said.
The post Is Magnesium the New Melatonin? appeared first on New York Times.




