- People who struggle with going to bed and maintaining uninterrupted sleep may opt for taking melatonin supplements.
- Magnesium, often preferred for energy support, has also been gaining traction as a sleep supplement.
- Medical News Today spoke to two experts to find out what the evidence says about how the two supplements compare for sleep support, and who may benefit more from each.
When people struggle to go to bed and to stay asleep throughout the night, they may opt to take a melatonin supplement, to boost levels of a hormone that essentially tells the nervous system when to “power down” for bed.
Recently, however, magnesium supplements have also emerged as a sleep aid, which may seem surprising, given that they have traditionally been used to
What does the evidence say, and is one supplement better than the other for sleep? Medical News Today spoke to two experts to delve into the science behind the use of these supplements for a better night’s rest.
We heard from Şebnem Ünlüişler, genetic engineer at the London Regenerative Institute, and from Opel Baker, MBChB, general practitioner at the Mayfield Clinic, both in the United Kingdom.
“Melatonin and magnesium work in very different ways,” said Ünlüişler. “Melatonin is a hormone that helps regulate the body’s circadian rhythm and signals that biological night has begun, so it tends to be most useful when the main issue is sleep timing, such as jet lag, shift work or a delayed sleep schedule.”
“Magnesium, on the other hand, is an essential mineral involved in normal nerve and muscle function, and it may support relaxation and sleep particularly in people with low magnesium intake or deficiency,” she explained.
Baker added that, unlike melatonin, magnesium “is not a sleep hormone and its effects on sleep are generally less direct.”
What does the evidence say about magnesium as a sleep supplement?
A randomized controlled trial published in Sleep Medicine in 2024 found that taking 1 gram (g) of magnesium L-threonate per day for 3 weeks helped improve sleep in study participants.
The researchers conducted this intervention in adults ages 35 to 55 years who reported sleep problems. There were 80 participants in total, and the researchers controlled for effectiveness by comparison with a placebo.
Another randomized, placebo-controlled trial, published in Nature and Science of Sleep in 2025, found that a different type of magnesium supplement, magnesium bisglycinate, produced modest improvements in adults with insomnia.
This trial totaled 155 participants ages 18 to 65 years with sleep problems. About half of these took 250 milligrams (mg) of magnesium bisglycinate per day over 4 weeks. The rest took a placebo.
A review of several trials — published in Cureus in 2024 — looking at the effect of different forms of magnesium on sleep quality and anxiety found the evidence to be too mixed to draw a sufficiently strong conclusion about whether or not magnesium supplementation can really help improve sleep.
“[T]he evidence for magnesium as a general sleep aid is still relatively limited,” Ünlüişler told MNT.
Despite the mixed evidence about magnesium’s effect on sleep, both Ünlüişler and Baker were clear that one specific group of people may stand to benefit from taking this supplement: Those with a magnesium deficiency.
“Magnesium may be more relevant for someone whose diet is lacking in magnesium, or where factors such as muscle tension or general physical relaxation are contributing to poor sleep,” said Baker.
“However, taking extra magnesium does not necessarily improve sleep if you already get enough through your diet,” he cautioned.
By contrast, “melatonin is likely to be more useful for people whose sleep problem is related to their body clock rather than simply being unable to switch off,” the physician added. “This can include people experiencing jet lag, shift workers or those whose sleep pattern has become delayed.
“It is also important to distinguish between struggling to fall asleep and waking repeatedly during the night,” Baker noted. “The underlying causes can be very different, so neither supplement should be viewed as a universal solution.”
Ünlüişler agreed, stressing that:
“[N]either supplement is universally ‘better’ [as a sleep aid] because the right choice depends on why someone is not sleeping well. It is also important not to use supplements as a way of overlooking persistent sleep problems, which can be related to stress, sleep apnea, restless legs, medications, hormonal changes or other underlying factors.”
Both experts further noted that, whichever supplement someone may choose to use as a sleep aid, they should be mindful of the potential side effects.
“With melatonin, both timing and dose matter, and taking more does not necessarily produce better sleep,” cautioned Ünlüişler, adding that “it can also cause next-day drowsiness, headache or dizziness, and may interact with certain medications.”
“Magnesium can cause gastrointestinal side effects and should be used cautiously in people with impaired kidney function,” she pointed out.
Baker also warned that “taking too much” of this supplement “can cause diarrhea, nausea and abdominal cramping.” He likewise stressed that people with kidney problems, in particular, should discuss the risks with a doctor beforehand “because the kidneys are responsible for removing excess magnesium.”
“The biggest caveat is that ‘natural’ does not automatically mean harmless or appropriate for everyone,” he noted.
“Ultimately, good sleep is much more complicated than finding the right supplement,” said Baker.
“A consistent sleep and wake time, getting daylight in the morning, regular exercise, limiting caffeine later in the day and creating a relaxing wind-down routine can all have a meaningful impact. Supplements may have a role for some people, but they should complement good sleep habits rather than replace them.”
– Opel Baker, MBChB
Team Health Accessible
Health & Wellness Editorial Team
HealthAccessible editorial team delivers trusted, accessible, and evidence-based health information for everyone.

