
Taking a magnesium supplement about an hour before bed to help with sleep is a recommendation I’ve seen quite often. In fact, even on social media, many people say 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.
While that mechanism sounds logical, how much does it actually matter in practice? What does the research say about its effects on sleep quantity and quality?
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?

A good starting point is to explore whether a magnesium deficiency impacts sleep. It makes sense to begin there as a kind of ‘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 magnesium levels on a blood test, then true deficiency is rare. This is because when magnesium intake drops, the body reduces magnesium excretion to help conserve it.
If we define it as low levels of intracellular magnesium, then it is far more common.
Since we don’t have an easy way to measure intracellular magnesium in the average person, it arguably makes sense to assess our intake against the gold standard.
Recommended Magnesium Intake

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:
- What if the acute effects of magnesium supplementation are more beneficial? Many supplements contain 200–300 mg of magnesium, which can be difficult to obtain from food in a single serving.
- It’s also worth considering the practical side of this. If most people have a suboptimal intake of this nutrient, it may be unrealistic to expect everyone to reach optimal levels through diet alone. If shown to be effective, supplements could be a more practical 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 explored sleep in general. However, some of the earlier research did find a link between magnesium deficiency and insomnia.
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:
- 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.
- 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

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 noted that observational studies showed improved sleep with higher magnesium intakes, while randomised 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

Although there’s not a large amount of research, it’s worth noting that most studies so far haven’t focused heavily on the type of magnesium supplement used. Instead, they have placed more emphasis 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

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 often see much larger sample sizes. For example, there are only a few controlled studies examining magnesium supplementation and sleep. While randomised controlled trials are the gold standard, it would be unwise to rely solely on them and ignore all other forms of evidence.
From the other perspective, anecdotal evidence has downsides:
- It is not placebo controlled.
- Other variables change, which could influence the outcome.
- 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’s hard to draw conclusions. If we had 10 or more studies with good sample sizes showing that magnesium didn’t outperform a placebo, I would disregard this anecdotal data. However, without those studies, I do pay a bit more attention to these anecdotes.
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 diarrhoea, 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 at the point where I can say, ‘Magnesium intake or supplementation beyond normal levels consistently improves sleep.’ However, I do think it’s worth trialing as an option, since it’s relatively cheap, safe when used in appropriate amounts, and might offer some benefit.
