For decades, melatonin has been a widely used supplement to aid sleep, with the market for melatonin-containing sleep aids projected to approach US$800 million in 2025. Recently, however, interest in magnesium as a potential sleep aid has increased, with sales of magnesium-containing sleep supplements rising by approximately 17 percent in 2025, compared to a 5 percent increase for melatonin products, according to market research firm NBJ.
This growing attention toward magnesium appears to be influenced in part by concerns about melatonin supplements. Jennifer Martin, a clinical psychologist specializing in sleep disorders at Florida International University, noted that some melatonin products have been found to contain higher hormone levels than advertised, alongside media reports linking melatonin to heart risks. These factors may be prompting consumers to explore alternatives such as magnesium.
Magnesium is an essential mineral involved in numerous physiological processes, including regulation of blood pressure, blood sugar, and nerve and muscle function. Despite its significance in the body, research on magnesium’s impact on sleep quality remains limited. In a 2025 clinical trial involving 155 adults with poor sleep, participants who took 250 mg of magnesium glycinate before bedtime showed modest but statistically significant improvements in insomnia symptoms compared with a placebo group.
Long-term observational data from a 2021 study of nearly 4,000 individuals aged 18 to 30 suggested that those consuming the highest amounts of magnesium—via diet or supplements—were about 36 percent less likely to sleep fewer than seven hours per night and 30 percent more likely to report higher-quality sleep. However, these associations did not hold among participants with depression, and the study’s lead author, Ka Kahe of Columbia University, emphasized that the findings do not establish causation. Confounding factors such as overall health may have influenced results, and benefits may not extend to all populations.
A 2022 review examining nine studies on magnesium’s effects on sleep found mixed outcomes. While some research indicated possible improvements, randomized controlled trials—the gold standard for establishing cause and effect—presented inconsistent evidence. Kelly Glazer Baron, director of the behavioral sleep medicine program at the University of Utah, explained that magnesium might enhance sleep by modulating neurotransmitters involved in relaxation and reducing muscle tension, though some of the observed benefits could reflect placebo effects.
In comparison, the evidence base supporting melatonin’s role in sleep is more extensive, particularly for circadian rhythm-related disorders and jet lag. Sujay Kansagra, a sleep specialist at Duke Health, pointed out that despite its efficacy in specific conditions, melatonin is generally not recommended for chronic insomnia since it does not address underlying causes. Kansagra also noted that no rigorous studies directly compare melatonin and magnesium for sleep outcomes.
Given current data, Kansagra does not discourage patients from trying magnesium supplements if they are otherwise healthy and can afford them, especially in the absence of magnesium deficiency. Magnesium is available in various forms—such as glycinate, L-threonate, citrate, and oxide—with glycinate and L-threonate preferred for sleep due to lower rates of gastrointestinal side effects like diarrhea and cramping.
Experts caution that supplements, including magnesium and melatonin, are not regulated as strictly as prescription drugs, making third-party certification advisable when purchasing. Importantly, reliance on these supplements may delay diagnosis and treatment of serious sleep disorders like sleep apnea or chronic insomnia. Medical consultation is recommended for individuals experiencing persistent sleep difficulties before initiating any supplement regimen.
