Blog Post

Does Magnesium Help with Sleep?

Magnesium and sleep featured image

Taking a magnesium supplement around 1 hour before bed to help with sleep has been a recommendation that I have seen pretty frequently. Heck even on social media I see a lot of people saying things like “Taking magnesium glycinate before bed has changed my life.”

The mechanism makes sense. Magnesium binds to GABA receptors. GABA is the neurotransmitter responsible for quieting down nerve activity. In theory, it helps you “wind down” and prepare for sleep.

Although that mechanism makes sense, how much does this matter in practice? What does the research that measures sleep quantity and quality show?

In this post, the research will be covered, and there will be a practical interpretation of how to use this information.

What Happens if You Have Too Little Magnesium?

Magnesium rich foods

A good starting point for this is by exploring whether a magnesium deficiency has any impact on sleep. I think it makes sense to start there, just as a bit of a “proof of concept” approach.

There is less research on this topic than you would expect. The research we do have though indicates that magnesium deficiency reduces sleep quality and quantity.

Either increasing the dietary intake of magnesium or taking a supplement could help there.

How Common Is Magnesium Deficiency?

Having a sub-optimal intake of magnesium is common. Having a deficiency is rare though.

People who are more likely to be deficient are:

  • Older adults.
  • Alcoholics.
  • People with very high BMIs.
  • People with kidney problems.
  • People with inflammatory bowel disease.

If we define magnesium deficiency as low levels of magnesium on a blood test, then a deficiency is rare. This is because when intake of magnesium drops, the amount of magnesium that is excreted also decreases, to help conserve it.

If we define it as low levels of intracellular magnesium, then it is far more common.

Since we do not have an easy way to measure intracellular magnesium in the average person, it arguably makes sense to look at our intake in comparison to the gold standard.

Recommended Magnesium Intake

Magnesium rich foods content

The recommended magnesium intake in Australia is 400-420mg for men and 310-320mg for women. Other countries have similar recommendations.

It is hard to find clear statistics on this, but most of the population falls well short of this target.

Food vs Supplements


I am normally a food-first person. I think most people would benefit from increasing their dietary intake of magnesium in general.

If magnesium were to help with sleep, beyond simply avoiding a deficiency, would food be enough to get the job done? I would wager it would help. But there are two other variables I would factor in:

  1. What if the acute effect of magnesium supplementation helps more? A lot of supplements contain 200-300mg of magnesium, which can be rare/harder to get through food in one hit.
  2. It is also worth thinking about the realistic nature of this. If the majority of the population has a sub-optimal intake of this specific nutrient, it could be unrealistic to expect everybody to increase it to the optimal level. Supplements, if beneficial, could be a more realistic option for some.

In terms of measuring the effect of dietary magnesium on sleep, we actually do have solid evidence that higher intakes of magnesium through food can help.

One study that included 4,000 participants had a consistent association between magnesium intake and sleep quality and quantity.

A larger study that had over 26,000 people also found that people with higher magnesium intakes got more/better sleep. 

Magnesium and Insomnia

The two studies mentioned above were exploring sleep in general. Some of the research mentioned prior to that did find that magnesium deficiency was linked with insomnia though.

One of the most cited studies on this topic involved 46 older adults with insomnia. They compared 500mg magnesium supplementation to a placebo.

Overall, the magnesium group got significantly better quality and quantity of sleep.

Blood levels of renin and melatonin were also higher too.

When interpreting this though it is worth highlighting that:

  1. Older people are more likely to have lower levels of magnesium due to a combination of lower dietary intake of it, and lower levels of absorption.
  2. We expect to see larger improvements in sleep quality and quantity in insomnia than we do in other areas of sleep research.

A 2021 systematic review of all the research on this topic only found 3 randomized controlled trials.

They found that on average, people got to sleep 17.36 minutes quicker and had an increase in total sleep time of 16.06 minutes. That looks promising.

The authors of that review were quick to highlight that there is way more research needed before we can make conclusive statements though.

On the other hand, they did highlight that when used in appropriate dosages, magnesium supplements are cheap and relatively safe, so could be worth trialling.

General Sleep

Woman in deep sleep

Even without insomnia, most people would love an easy way to improve their sleep.

A systematic review from this year (2023) was published exploring the relationship between magnesium and sleep in general.

They highlighted that observational studies showed an improvement in sleep with higher intakes of magnesium. Randomized controlled trials, which are more tightly controlled, had more mixed findings.

The conclusion of this was simply that more research is needed to figure out if there is a benefit to increasing magnesium intake, either through food or supplements, beyond normal intakes.

Types of Supplements

Magnesium supplements

Although there is not a heap of research, it is worth noting that most of the research done so far has not been overly focused on the type of supplement used. They are more focused on the dosage.

But there are differences between supplements.

The main differences come down to bioavailability and side effects.

Forms such as magnesium citrate and glycinate have higher levels of bioavailability than most others.

For sleep, those are the two options I would likely utilise if you wanted to use one.

Anecdotal Evidence

Apple Watch Sleep Quality and Quantity

From my perspective, part of being an evidence-based practitioner involves looking at BOTH what the peer-reviewed research shows AND what happens in the real world.

In the real world, we can see much larger sample sizes. For example, there are only a few controlled studies looking at magnesium supplementation and sleep. While randomized controlled trials are the gold standard, it would be silly to only trust those and ignore EVERYTHING else.

From the other perspective, anecdotal evidence has downsides:

  1. It is not placebo controlled.
  2. Other variables change, which could influence the outcome.
  3. We must piece together each individual experience, in the context of these changing variables and the lack of placebo.

In practice, I have seen a lot of people who have supplemented magnesium and seen improvements in their sleep quality and quantity.

A lot of people who track their sleep quality swear by it.

Without placebo control though, it is hard to read into this. If we had 10+ studies with good sample sizes showing that magnesium did not outperform placebo, I would ignore this anecdotal data. Without those studies though, I do pay a bit more attention to these anecdotes.

Restless Legs Syndrome

Restless Legs Syndrome

This might be a bit niche, but some people experience sleep disruptions due to restless legs syndrome.

It is common to hear that magnesium supplements help with restless leg syndrome. If that were to be true, this then could carry over to improved sleep.

A systematic review from 2019 has looked at this topic. Unfortunately, this is another area with a lack of research. The research we have so far does not look overly promising though.

At this stage, we cannot say that magnesium helps with restless legs syndrome consistently. But it is also an option that could be worth trialling if you are interested.

Side Effects of Magnesium Supplements

The main potential side effects of magnesium are gut-related issues such as diarrhea, nausea, and vomiting. These are even more common when large dosages are used.

For context, high-dose magnesium supplements are sometimes used for a laxative effect to treat constipation.

Dosage and How to Take

The standard supplement dosage is 200-300mg of magnesium around an hour before bed.

A lot of forms of magnesium are fine, but magnesium citrate and glycinate are good options.

If there are any issues with the laxative effect that citrate sometimes has (particularly in higher amounts), glycinate is likely a better option.

Practical Summary

The research on magnesium and sleep is mixed.

As a simple summary:

  • Magnesium deficiency is associated with poor sleep.
  • Low magnesium intake, even without low blood levels, is associated with poor sleep, in comparison to higher magnesium intake.
  • People with insomnia appear to have benefited from magnesium supplementation prior to sleep in research, but the sample sizes have been small.
  • There is even less evidence of improvements in general sleep from magnesium supplementation, but anecdotal evidence is promising.

I am not personally at a point where I say, “Magnesium intake or supplementation beyond normal levels helps improve sleep consistently.” But I am at a point where I think it is worth trialling as an option since it is relatively cheap and safe when used in appropriate amounts and might help a bit.

By Aidan Muir

Aidan is a Brisbane based dietitian who prides himself on staying up-to-date with evidence-based approaches to dietetic intervention. He has long been interested in all things nutrition, particularly the effects of different dietary approaches on body composition and sports performance. Due to this passion, he has built up an extensive knowledge base and experience in multiple areas of nutrition and is able to help clients with a variety of conditions. One of Aidan’s main strengths is his ability to adapt plans based on the client's desires. By having such a thorough understanding of optimal nutrition for different situations he is able to develop detailed meal plans and guidance for clients that can contribute to improving the clients overall quality of life and performance. He offers services both in-person and online.