Start sleeping better now

Magnesium and sleep ― how are they related?


Magnesium — key points

Magnesium has become popular as a natural sleep aid, so we’ve brought together everything you need to know about taking magnesium for your sleep. In this article we’ll cover:

  • what magnesium is and why it’s crucial to our health
  • what’s known about whether it can aid sleep
  • what drawbacks there may be to taking magnesium
  • steps to take if you need a proven solution to your sleep problem.

Magnesium as a sleep aid

People are increasingly looking for ways to improve their sleep without the use of conventional sleeping pills. Many people are now turning to more ‘natural’ products as sleep aids, such as vitamins, minerals or herbs which may promote sleep.

Some popular examples include products containing melatonin, valerian or tryptophan. Magnesium is another natural compound which has gained popularity as a sleep aid.

In this article, we’re going to look at what exactly it is about magnesium that’s led to it being used to help people sleep, whether the science backs up the claims and if taking magnesium comes with any drawbacks. We’ll get started with a quick overview of magnesium itself.

What is magnesium?

Magnesium is a mineral that’s essential for the body to function and remain healthy. We get magnesium from our diet and it’s naturally present in a wide range of food types, such as green leafy vegetables, nuts, seeds, legumes and whole grains. It’s also added to certain foods, such as breakfast cereals and some bottled water brands.

Even with plenty of dietary sources, it’s believed that many of us may still have lower than recommended levels of magnesium in our bodies.1

In the UK, NHS guidelines suggest a daily recommended intake of magnesium for adults (19-64 years) of 300mg for men and 270mg for women.2 Whereas America’s National Institute of Health (NIH) puts the figure a little higher, with a range of 400-420mg/day for adult men and 310-320mg/day for adult women.3


Magnesium plays a role in a huge range of functions in your body. Your cells use magnesium in hundreds of processes and it’s needed for your body to produce energy. It’s important for:

  • maintaining strong bones
  • regulating blood sugar and blood pressure
  • supporting the function of your muscles and nerves.

So it’s clear that magnesium is an important factor in our diets, and plays a lot of roles in the body, but can it help you sleep?

Let’s look at the evidence.

Wanting to sleep better naturally?

Instead of looking at sleep supplements, how about a solution that’s totally free of pills and backed by years of solid science? Our highly skilled sleep coaches work with you to identify and construct a plan to remove the obstacles between you and great sleep. Start by answering our short sleep questionnaire to see if we can help you.


How does magnesium help you sleep?

The key to its role as a sleep aid seems to stem from the fact that magnesium is important for helping our bodies relax. As we touched on earlier, magnesium has many roles in the body and one of these roles is in regulating signals in our nervous system.

The nervous system controls all your bodily functions from the physical, such as breathing or moving, to mental functions, like thinking and feeling.

Signals pass from your brain, down your spinal cord and all throughout your nerves, to every part of the body. You can think of the nervous system like an information highway along which chemical messages, called neurotransmitters, pass continually.

Magnesium acts on these neurotransmitters. It can block some that are known to stimulate the body and can help increase levels of neurotransmitters known to have a calming effect. This can result in helping you to relax and increases feelings of calmness.

This is one way in which it’s considered to aid sleep. By helping you to relax, magnesium may help you fall asleep quicker and could also improve sleep quality. One neurotransmitter that magnesium is known to affect is Gaba-Aminobutyric Acid (GABA).

GABA is a chemical messenger naturally produced in the brain which works by binding to certain receptors to block their activity. Think of it kind of like a temporary roadblock or speed bump.,

This leads to a slowing down of signals in your nervous system until GABA is removed and the blockade lifted. So your nervous system is essentially calmed down and signals can’t race through it.

This results in you feeling calm, relaxed, de-stressed or sleepy. Magnesium can bind to GABA receptors and this helps to increase levels of GABA.4 The increase in GABA boosts feelings of relaxation, calm and sleepiness.

Is there evidence that magnesium can help you sleep?

Scientific studies have mostly taken one of two approaches to investigate the links between magnesium and sleep:

  • looking at how much magnesium people get from their diet and comparing it with how well they sleep
  • investigating whether sleep can be improved by people taking magnesium compared to a placebo.5

In a small study of older adults (60-75 years) with insomnia, taking a 500mg magnesium supplement every day for 8 weeks resulted in statistically significant improvements in how quickly people fell asleep and how efficiently they slept.6

Significant reduction in the insomnia severity index (ISI) scores were also recorded. However, a review that looked at the combined results of three studies (151 older adults) didn’t find any significant improvement in sleep with magnesium supplementation and couldn’t conclude whether taking magnesium was effective or safe for older adults.7


A large study looked at people’s magnesium intake and likelihood of sleep disorders, in nearly 1500 people over the course of five years. Higher dietary magnesium intake seemed to reduce the likelihood of falling asleep during the day, but only specifically in women.8A similar study looked at data from around 4,000 participants and compared their magnesium intake with their reported quality of sleep. This study found an association between magnesium levels and how much sleep people got.9 An even larger study of over 26000 people found a link between magnesium intake and short sleep duration (<7hrs): people with inadequate magnesium intake slept for less time than people who were getting enough magnesium in their diets.10

There’ve also been some studies on the effects on sleep when taking magnesium in combination with other compounds (such as melatonin, B vitamins or zinc).11 12 Encouraging results from one study showed that taking a supplement of magnesium-melatonin-vitamin B complex reduced insomnia symptoms and consequently improved quality of life.12

In another study, people were given a supplement of magnesium, melatonin and zinc nightly.12 Results from this study showed this combined supplement improved sleep quality and as a result, people reported improvements to their quality of life, too.

It’s worth noting that these two studies were only carried out in very small populations (60 people in the first study and 43 people in the second) and it’s not possible from either study to say whether it was the magnesium, the other compounds or the combination of them all together that improved symptoms of sleep disturbance.

So overall, the scientific evidence seems to point to magnesium having some positive effects on sleep but more data is needed to make any conclusive statements about magnesium supplements.

Magnesium for anxiety, stress and depression

Evidence suggests that magnesium may also be helpful for improving stress, anxiety and depression.13 14 There’s some evidence that not getting enough magnesium in your diet can increase your risk of depression15 and some studies have found an association with magnesium intake and risk of anxiety.14

However, as with most studies on magnesium, there’s conflicting results and more studies are needed to strengthen any claims.

One thing we do know for sure is that your mental health can have a huge effect on how well you sleep and, similarly, problems sleeping can have a negative effect on your mental health.

If magnesium does have a positive effect on stress, anxiety or depression, the person taking it may additionally see improvements to their sleep. However, the data supporting the use of magnesium supplements to improve mental health isn’t clear cut.

While results seem to point to positive effects from taking magnesium, the studies often look at magnesium in combination with other compounds, so it’s hard to say which of the compounds is truly responsible for the improvement seen.

Several studies show only a very small positive effect or no effect at all, so many scientists conclude that further research on magnesium is needed before we can say for sure whether this mineral really is effective in improving mental health or sleep.14

As we’ve mentioned previously though, magnesium is known to act on neurotransmitters that help us to relax and feel calm, so it may be that ensuring your diet has enough magnesium can have a positive effect on your mental health through this mechanism.


Which type of magnesium is best for sleep?

Magnesium supplements come in many forms, with some of the most common including:

  • magnesium glycinate
  • magnesium lactate
  • magnesium oxide
  • magnesium citrate
  • magnesium chloride.3

If you’re considering talking magnesium in supplement form, it’s a good idea to look at what magnesium is combined with in the supplement you’re interested in as they can have slightly different effects.

For example, certain forms are thought to be absorbed by the body better than others, some are thought to be gentler on your digestive system and some aid bowel motility (magnesium oxide is used to treat constipation). With this in mind, it’s worth reading the label or speaking to a pharmacist/doctor beforehand.

For sleep, magnesium glycinate seems to be popular. This is the form that showed potential in the study of 46 older adults mentioned earlier. In this form, magnesium is combined with glycine, which is also thought to help sleep.16

There’s also no set dose for how much magnesium you should take for sleep. America’s NIH states that you shouldn’t take more than 350mg of supplemental magnesium per day and the NHS states that if you are going to take magnesium supplements, 400mg/day is unlikely to cause harm.2 3


Other forms such as creams, body mists and bath soaks all rely on the magnesium they contain being absorbed through your skin and then getting into your system. This is known as a transdermal route.

Some product makers claim that transdermal magnesium is absorbed better than tablet form, but science does not back this up. There aren’t many good-quality scientific studies into transdermal magnesium and those published aren’t strong enough to promote this method of intake over any other.17

Magnesium side effects

If you’re getting all your magnesium needs from your diet, your body will ensure that you don’t absorb too much magnesium. If you’re fit and healthy, your kidneys filter out excess magnesium and it’s removed from your body in your urine.

If you take magnesium supplements, there’s a risk that you may experience some mild side effects, which can include:

  • diarrhoea
  • nausea
  • stomach cramps.

The NHS states that taking in more than 400mg of magnesium per day as a supplement can lead to side effects such as diarrhoea.

Magnesium supplements can interact with certain types of medication, especially:

  • antibiotics
  • antacids
  • certain medication for diabetes
  • some blood pressure medications.

When to take magnesium for sleep

If you’re considering taking magnesium as a sleep aid, it’s worth discussing with your healthcare provider. This is particularly important if you’re taking any other medication, as magnesium can interact with certain drugs and you’d need to minimise any risk of this happening.

Some sources state that magnesium should be taken in the hours before bed, others state that it can be taken at any time of the day. As there’s not enough scientific data available to support either claim, it’s not possible to say which time of day, if any, would be best.


Is magnesium good for sleep problems?

Whilst magnesium may aid sleep through its calming effects, whether it’s helpful for sleep problems depends on the specific disorder. Magnesium isn’t going to be helpful as a sleep aid for every sleep problem and it’s not going to get to the core of why you’re not sleeping well.

As we’ve discussed above, a few studies have looked at the effect of magnesium supplements to improve insomnia and the results are encouraging, but more data’s needed to confidently say whether magnesium does improve insomnia.

There’s some evidence supporting a role for magnesium in the treatment of restless leg syndrome (RLS)18 19 and nocturnal leg cramps,20 but conflicting data exists that casts doubt on whether magnesium is effective for RLS.21

Studies have also looked at the links between magnesium and obstructive sleep apnea (OSA).22 23 One study showed a link between levels of magnesium in the blood and severity of OSA, reporting that people with OSA have lower magnesium levels than healthy people without OSA.22

Other studies exist to back this up, yet others find no difference between magnesium levels in people with OSA compared to those without, so there’s probably other factors at play here.

There’s some evidence that sleep deprivation in people with OSA can lead to reduced magnesium levels and that successfully treating OSA causes magnesium levels to increase.23 The authors concluded that increasing magnesium intake may have a positive effect on OSA.

Sleep better without magnesium

You’ve probably read this article because you want to know if magnesium will help you sleep. Everybody deserves a good night’s sleep and we understand how, for many people, getting the sleep you need can become a real problem.

People often turn to sleeping pills or supplements as a first measure when they’re experiencing difficulty sleeping. Medication can seem like a low effort, quick fix but it’s not going to get to the root of why you’re having difficulty sleeping.

You may be surprised to learn that the first-line treatment for insomnia, recommended across the globe, is actually a totally medication-free approach that’s backed up by decades of science and is known to produce long-lasting results.24 25 26

Cognitive Behavioural Therapy for insomnia (CBTi) is a form of therapy that’s been used to treat insomnia for decades. There’s a wealth of evidence to show how effective CBTi can be and it’s delivered over a relatively short time-scale.

So, if it’s so effective, why isn’t it always the first approach healthcare professionals recommend? It’s a fact that most forms of CBT, whether for insomnia, mental health or other reasons, are oversubscribed.

What does this mean? It’s a supply and demand problem — there are more people who need CBT than there are available services. This is especially true for CBTi where there’s a lack of trained therapists available for face-to-face therapy.

Additionally, some people might find the thought of meeting someone to discuss their sleep problems daunting or just plain inconvenient to their routine. It can be a huge commitment to travel to hospital or an office for CBTi and waiting lists can be long.

The last thing you need when you take positive steps to address a sleep problem is to come up against a brick wall in the form of a six month waiting list.

This is where Sleepstation can help. We use CBTi to help you to get to the core of why you’re not sleeping well. We help you to develop good sleep hygiene and equip you with all the tools and resources you need to get back to sleeping well.

And we do all of this remotely so you can complete your course from the comfort of your own home. This doesn’t mean you’re doing it alone. Quite the opposite — you’ll have the support of our sleep coaches at every step.


We’re here to listen, help and advise on your journey to better sleep. We’ll be there to offer reassurance that your sleep will get better and we’re always ready to celebrate every little sleep victory with you, too.

Take our short sleep questionnaire now and see how we can help you.

Is magnesium a good sleep aid?

The science suggests more evidence is needed before we can say for sure whether it’s helpful for sleep. Overall, results seem to be neutral or slightly positive but large studies with lots of participants are needed for confirmation.

Magnesium plays key roles in many processes in our bodies so ensuring your magnesium levels are at their best by getting enough of it in your diet is a sensible step for all of us. Whether taking a supplement of it will help you sleep remains to be seen.

If you’re looking for something to help you sleep better, or you want to improve an existing sleep problem, then we can help. There’s no medication involved, our approach is backed up by decades of science and our success stories speak for themselves.


  • You should be able to get all the magnesium your body requires from diet alone.
  • Magnesium does work on pathways involved in both calming and relaxing your body.
  • More data is needed to conclusively say where magnesium supplementation can aid sleep.
  • Magnesium can interfere with other drugs you may be taking, so it’s recommended to consult your doctor before you take any supplements.


  1. DiNicolantonio JJ, O’Keefe JH, Wilson W. Subclinical magnesium deficiency: a principal driver of cardiovascular disease and a public health crisis. Open Heart 2018; 5: e000668.  ↩︎
  2. Vitamins and minerals – Others [Internet]. 2022 [cited 8 April 2022]. Available here. ↩︎
  3. Office of Dietary Supplements – Magnesium [Internet]. 2022 [cited 8 April 2022]. Available here. ↩︎
  4. Boyle NB, Lawton C, Dye L. The effects of magnesium supplementation on subjective anxiety and stress-A systematic review. Nutrients 2017; 9. ↩︎
  5. Arab A, Rafie N, Amani R, Shirani F. The role of magnesium in sleep health: A systematic review of available literature. Biol Trace Elem Res 2022.  ↩︎
  6. Abbasi B, Kimiagar M, Sadeghniiat K, Shirazi MM, Hedayati M, Rashidkhani B. The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial. J Res Med Sci 2012; 17: 1161–1169. ↩︎
  7. Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a Systematic Review & Meta-Analysis. BMC Complement Med Ther 2021; 21: 125.  ↩︎
  8. Cao Y, Zhen S, Taylor AW, Appleton S, Atlantis E, Shi Z. Magnesium intake and sleep disorder symptoms: Findings from the Jiangsu Nutrition Study of Chinese adults at five-year follow-up. Nutrients 2018; 10: 1354.  ↩︎
  9. 9Zhang Y, Chen C, Lu L, Knutson KL, Carnethon MR, Fly AD et al. Association of magnesium intake with sleep duration and sleep quality: findings from the CARDIA study. Sleep 2022; 45.  ↩︎
  10. Ikonte CJ, Mun JG, Reider CA, Grant RW, Mitmesser SH. Micronutrient inadequacy in short sleep: Analysis of the NHANES 2005-2016. Nutrients 2019; 11: 2335.  ↩︎
  11. Djokic G, Vojvodić P, Korcok D, Agic A, Rankovic A, Djordjevic V et al. The effects of magnesium – melatonin – Vit B complex supplementation in treatment of insomnia. Open Access Maced J Med Sci 2019; 7: 3101–3105.  ↩︎
  12. Rondanelli M, Opizzi A, Monteferrario F, Antoniello N, Manni R, Klersy C. The effect of melatonin, magnesium, and zinc on primary insomnia in long-term care facility residents in Italy: a double-blind, placebo-controlled clinical trial: Dietary supplement and primary insomnia in long-term care facility residents. J Am Geriatr Soc 2011; 59: 82–90. ↩︎
  13. Boyle NB, Lawton C, Dye L. The effects of magnesium supplementation on subjective anxiety and stress-A systematic review. Nutrients 2017; 9.  ↩︎
  14. Kirkland AE, Sarlo GL, Holton KF. The role of magnesium in neurological disorders. Nutrients 2018; 10. doi:10.3390/nu10060730.  ↩︎
  15. Li B, Lv J, Wang W, Zhang D. Dietary magnesium and calcium intake and risk of depression in the general population: A meta-analysis. Aust N Z J Psychiatry 2017; 51: 219–229. ↩︎
  16. Kawai N, Sakai N, Okuro M, Karakawa S, Tsuneyoshi Y, Kawasaki N et al. The sleep-promoting and hypothermic effects of glycine are mediated by NMDA receptors in the suprachiasmatic nucleus. Neuropsychopharmacology 2015; 40: 1405–1416. ↩︎
  17. Gröber U, Werner T, Vormann J, Kisters K. Myth or reality-transdermal magnesium? Nutrients 2017; 9. doi:10.3390/nu9080813. ↩︎
  18. Hornyak M, Voderholzer U, Hohagen F, Berger M, Riemann D. Magnesium therapy for periodic leg movements-related insomnia and restless legs syndrome: an open pilot study. Sleep 1998; 21: 501–505.  ↩︎
  19. Popoviciu L, Aşgian B, Delast-Popoviciu D, Alexandrescu A, Petruţiu S, Bagathal I. Clinical, EEG, electromyographic and polysomnographic studies in restless legs syndrome caused by magnesium deficiency. Rom J Neurol Psychiatry 1993; 31: 55–61.  ↩︎
  20. Barna O, Lohoida P, Holovchenko Y, Bazylevych A, Velychko V, Hovbakh I et al. A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps. Nutr J 2021; 20: 90.  ↩︎
  21. Marshall NS, Serinel Y, Killick R, Child JM, Raisin I, Berry CM et al. Magnesium supplementation for the treatment of restless legs syndrome and periodic limb movement disorder: A systematic review. Sleep Med Rev 2019; 48: 101218. ↩︎
  22. Karamanli H, Kizilirmak D, Akgedik R, Bilgi M. Serum levels of magnesium and their relationship with CRP in patients with OSA. Sleep Breath 2017; 21: 549–556. ↩︎
  23. Al Wadee Z, Ooi SL, Pak SC. Serum magnesium levels in patients with obstructive sleep apnoea: A systematic review and meta-analysis. Preprints. 2021. doi:10.20944/preprints202108.0551.v1.  ↩︎
  24. Edinger JD, Arnedt JT, Bertisch SM, Carney CE, Harrington JJ, Lichstein KL et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med 2021; 17: 255–262. ↩︎
  25. Riemann D, Baglioni C, Bassetti C, Bjorvatn B, Dolenc Groselj L, Ellis JG et al. European guideline for the diagnosis and treatment of insomnia. J Sleep Res 2017; 26: 675–700. ↩︎
  26. Insomnia | Health topics A to Z | CKS | NICE [Internet]. 2022 [cited 11 April 2022]. Available here. ↩︎