Welcome to our third blog in our four-part series on melatonin and sleep. In our first blog, Sleep Cycle’s Head of Sleep Science, Prof Mike Gradisar, answered 20 common questions about melatonin. The second blog highlighted the vast array of non-sleep conditions that melatonin can be used for.

In this third article, Mike pits melatonin against another popular supplement that is used for sleep – magnesium. Which one is better for sleep? In this article, we’ll cover Mike’s analysis and comparison of the two supplements.

The M-Words

You know the situation. You’re scrolling through social media and one of your friends can’t sleep. They put their cry for help out to their network. “Milk and honey” one friend replies. “Read this book”. “Meditate”. “Relax”. “Be mindful”. “Get off your phone!”. And then there’s the M-words.

Not just melatonin – but magnesium. As you will have learned from our 1st blog in this series, not all ‘melatonins’ are created equal. This rule also applies to magnesium.

Which magnesium is best for sleep?

If you look closely at the active ingredients on a Sleep Supplement or a bottle of Magnesium in your pharmacy, you will likely see that there is at least one specific type of magnesium listed.

Oftentimes, we don’t hear which type of magnesium we should use. And sometimes we’re fed misleading information on specific supplements at specific doses.  For example, in certain social media channels, Magnesium Threonate at a dose of 145 milligrams was hailed as a supplement that would make you drowsy fast and facilitate sleep. However, the science so far doesn’t support some of these far-fetched claims. Hence it’s always of utmost importance to speak to your physician whenever considering supplements for sleep disorders or any other condition. The truth of the matter also is that there’s no specific type of magnesium supplement that has a proven stronger effect than others when looking at magnesium alone. 

Supplements are on the shelf for you to take in case you need to supplement your diet so that you get sufficient levels of magnesium in your body.

Which sleep problems result from low magnesium levels?

There’s a notion that when you reach normal levels of magnesium, it will effectively take you from poor sleep to good sleep. This suggests that your sleep problem was caused by low levels of magnesium. But is this the case?

As expressed by Lowenstein & Stanton in 1986: Magnesium can be detected in our blood, and levels differ depending on your age, gender and race.”  Usually, we absorb magnesium into our bloodstream from our diet. Foods that are high in magnesium include green vegetables (eg, spinach, broccoli), seeds and nuts (eg, pumpkin seeds, almonds and cashews) and starchy foods like potatoes and rice.

What many people do not know is that the group of people more susceptible to sleep issues related to magnesium are older adults (eg, >55 years of age). This can occur for two reasons – namely that their diets can become low in magnesium, plus their gastrointestinal system has a reduced capacity to absorb magnesium (compared to when they were younger.).

This magnesium deficiency may be linked to specific sleep issues, including an increased chance of being awake during the night – and reduced deep sleep. This leads to the next question – if a person is magnesium deficient and experiencing significant time awake during the night (ie, >30 minutes), can magnesium supplementation help them sleep better through the night?

Can magnesium supplements treat sleep problems caused by low magnesium levels?

One group of researchers recently surveyed the scientific evidence to see whether magnesium could improve symptoms of insomnia. Despite the popularity of magnesium for the purposes of improving sleep, these researchers found only three clinical trials that used magnesium for people with insomnia. They found that compared to a placebo, magnesium was able to reduce the amount of time it takes to fall asleep by 17 minutes, and thus increase sleep by about the same amount. The researchers noted that with so few quality studies testing magnesium, we cannot yet be confident of these findings. 

The other comment by these researchers was that the clinical trials evaluating magnesium were of low quality.

Which one is better for sleep? Melatonin or Magnesium?

We’ve taken a closer look at each of these three studies to form a comprehensive analysis. 

If the majority of people who will benefit from magnesium are likely to be older adults (>55 years) with difficulties sleeping through the night, then we can gain by comparing the relative benefits of magnesium vs melatonin for this same group.

We’ve already seen that based on these three studies, magnesium reduces the time taken to fall asleep by 17 min. In comparison, a recent meta-analysis of 14 studies showed two different types of melatonin meant people fell asleep 14 minutes faster (compared to taking a placebo pill).

When it comes to getting more sleep, magnesium provided an extra 15 minutes of sleep. Research on melatonin has found it provides 21 minutes more sleep than taking a placebo pill.

Looking at the sum total  – literally – there isn’t too much difference between taking melatonin or magnesium.  But – if we look at all people across all ages, then melatonin can be used for a larger group of people for a variety of different sleep issues.

In children, melatonin can produce a sleepy effect, thus helping them to fall asleep quicker. The evidence suggests that melatonin helps children to fall asleep 21 minutes faster – and the likelihood of experiencing side effects is very low (0.5%). Teenagers usually suffer from a delay in the timing of their sleep due to their internal body clock. Research shows that melatonin can be used to move their body clock earlier, so they can fall asleep earlier. 

So whilst magnesium provides equivalent sleep benefits to older adults, melatonin is more versatile in the sleep benefits it provides across the lifespan.

A note on muscle cramps

In conclusion,  if you’re in the right age bracket, and your sleep issue is linked to a magnesium deficiency, you may gain an extra quarter of an hour of sleep. Just be aware that this finding is not yet a fact. It’s based on very few studies, where even the researchers weren’t overly confident of the result.

But let’s now explore another concept about magnesium. It’s commonly reported on the internet that magnesium can also help if you experience muscle cramps during the night.

A 2014 meta-analysis found that compared to a placebo pill, magnesium supplementation only decreased the number of nighttime cramps – per week – by 0.3. When they looked at only pregnant women who took magnesium for nighttime cramps, they had a better improvement, which was 0.8 less cramps per week. The evidence simply doesn’t support it.

The winner is…

If future studies investigating magnesium for sleep show it’s still true that it provides an extra 15 minutes per night, then magnesium may be worth it. After all, across an entire seven days, 15 minutes of extra sleep per night equates to an extra 2 hours and 15 minutes a week. But if you’re experiencing muscle cramps, then taking magnesium won’t change them one little bit. Literally. You won’t even get 1 less cramp per week.

Head-to-head, melatonin may be the winner for your sleep – especially if you’re not a magnesium-deficient older adult.

In our next and final article in this four-part melatonin series, we’ll take a closer look at using melatonin for a circadian rhythm issue that millions of people around the world suffer from each year – jetlag. And in doing so, you’ll be able to see how melatonin can be used for other types of circadian rhythm issues (eg, shift work). Stay melatuned!

Summary FAQs

Does magnesium help you sleep?

Although findings need to be yet fully proven, research suggests that magnesium is able to reduce the amount of time it takes to fall asleep by 17 minutes, and thus increase sleep by about the same amount. However, older adults are the group of people more susceptible to experience insomnia and reduced deep sleep related to low levels of magnesium.

What is the best magnesium for sleep?

There’s no specific type of magnesium that has a proven stronger effect than others on sleep when looking at magnesium alone. 

Magnesium for muscle cramps – does it really work?

The current research doesn’t support it – a 2014 study found that magnesium supplementation only decreased the number of nighttime cramps – per week – by 0.3.

Magnesium and melatonin – which one is better for sleep?

Melatonin may be the winner for general people’s sleep – as research has found it provides 21 minutes more sleep (2 hours and 27 minutes a week). However, if future research can prove that magnesium provides an extra 15 minutes per night (2 hours and 15 minutes a week), then it may be worth a try too.


Better sleep starts tonight. Try Sleep Cycle for free.