Key Takeaways
  • Magnesium helps regulate blood sugar, blood pressure, and protein production.
  • There is limited research on how magnesium supplements help with sleep.
  • Some individuals find magnesium supplements to promote sleep, and a few studies have demonstrated a sleep benefit.
  • Consult with your doctor before adding any supplements to your diet.

Magnesium is a mineral that is essential for processes throughout the body, including communication between cells in the nervous system. Sleep is largely controlled by the nervous system, and experts believe that nutrients like magnesium may play a role in sleep health. However, the exact relationship between magnesium and sleep is still being studied. 

We cover how magnesium impacts sleep, other benefits and risks of magnesium, and how to use magnesium for better sleep.

What is Magnesium?

Magnesium is one of several  electrolytes in the body and plays essential roles in the production of proteins, bones, and DNA. Magnesium is important for maintaining blood sugar, blood pressure, and regulating activity in the muscles, nerves, and cardiovascular system.

Magnesium in the body typically comes from a person’s diet. Additional sources of magnesium include dietary supplements and medicines, including laxatives and over-the-counter remedies for heartburn and indigestion.

Chart of foods containing higher magnesium content
Chart of foods containing higher magnesium content

How Magnesium Impacts Sleep

Magnesium is included in a variety of nutritional supplements and natural sleep aids. Despite claims that magnesium can improve sleep, few studies have investigated this link. Researchers hypothesize that magnesium may relax the central nervous system and cause chemical reactions in the body that increase sleepiness .

Studies suggest that magnesium supplements might help to reverse age-related changes in sleep often seen in older adults. Healthy magnesium levels may have an important role in the development of baby and infant sleep cycles. In contrast, low magnesium could be associated with poor sleep quality.


Better Sleep Starts Here

Try our proprietary bi-magnesium rest support formula. Its research-backed, clinically-studied ingredients are made to relax your mind and body for restful sleep.

sf-arrow-rounded Icon Shop Now

Magnesium and Insomnia

Insomnia is defined as difficulty either falling or staying asleep that is accompanied by daytime impairments. People with insomnia may turn to supplements like magnesium to help with sleep. 

Research is not clear on the role of magnesium supplements in the treatment of insomnia. Some studies have shown encouraging findings. One study of older adults with insomnia found that magnesium supplementation at a dose of 500 milligrams daily for eight weeks helped them fall asleep fast, stay asleep longer, reduced nighttime awakenings, and increased their levels of naturally circulating melatonin.

“Magnesium may help with sleep problems, especially if they are related to scenarios which are caused by a deficiency of magnesium, such as leg cramps.”

Dr. Abhinav Singh, Sleep Medicine Physician

Magnesium and Restless Legs Syndrome

Restless legs syndrome is a sleep-related movement disorder that creates an irritating urge to move the legs. The exact cause of this condition remains unclear, but some researchers suggest that magnesium deficiency may play a role in the condition’s development.

Studies have not demonstrated a clear relationship between magnesium levels and restless legs syndrome in the general population. However, there is some evidence that magnesium may play a role in restless legs syndrome that develops during pregnancy or while receiving dialysis .

Some have found that magnesium supplementation may be helpful to reduce symptoms in people with restless legs syndrome. But a more recent study of people with many types of cramps, including restless legs syndrome, found no benefit from magnesium supplementation.

Other Benefits of Magnesium

Supplemental magnesium may be recommended by a doctor for people with conditions that cause a magnesium deficiency. Magnesium may be given to people who have certain health conditions, including diarrhea, pancreatitis, and uncontrolled diabetes

There’s some evidence showing that magnesium supplements may benefit people with certain  chronic conditions like migraine headaches, high blood pressure, and osteoporosis. But more research is needed to determine how helpful magnesium is in managing these conditions.

Risks of Magnesium

In most cases, magnesium supplements are safe. A dangerously high level of magnesium is rare in otherwise healthy people unless they take a very high dose of magnesium.

Symptoms of magnesium toxicity can range from mild to severe, and vary depending on a person’s magnesium level. Symptoms of excessive magnesium include:

  • Nausea
  • Headache
  • Drowsiness
  • Low blood pressure
  • Muscle paralysis
  • Cardiac arrest

Magnesium vs. Melatonin

Melatonin and magnesium supplements are both used to improve sleep, but they work in different ways in the body. Melatonin is a sleep hormone that the pineal gland in the brain produces when the time to sleep is approaching. Adding supplemental melatonin may help people fall asleep but may be less helpful for staying asleep all night.

Magnesium may help to quiet the nerves in the body that keep people awake. However, while experts recommend melatonin for treating some sleep disorders, magnesium may not be something that a doctor recommends unless a person has another reason to take it, such as evidence of low magnesium levels.

How to Use Magnesium for Sleep

Overall, the evidence for magnesium on insomnia and other sleep disorders remains mixed. However, some evidence shows that otherwise healthy people may benefit from low doses of oral magnesium supplements to help improve symptoms of insomnia. Research suggests doses of up to one gram of magnesium should be taken no more than three times daily.

While magnesium supplements are generally considered safe, there are some people who are at a higher risk for magnesium toxicity or harmful drug interactions. Therefore, before purchasing a magnesium supplement, talk to a health care provider first to find out if taking magnesium is safe and warranted.

Medical Disclaimer: The content on this page should not be taken as medical advice or used as a recommendation for any specific treatment or medication. Always consult your doctor before taking a new medication or changing your current treatment.

Learn more about our Editorial Team

9 Sources

  1. A.D.A.M Medical Encyclopedia. (2015, April 2). Minerals. MedlinePlus., Retrieved July 20, 2023, from
  2. Schwalfenberg, G. K., & Genuis, S. J. (2017). The importance of magnesium in clinical healthcare. Scientifica, 2017.
  3. Mah, J., & Pitre, T. (2021). Oral magnesium supplementation for insomnia in older adults: A systematic review & meta-analysis. BMC Complementary Medicine and Therapies, 21(1), 1-11.
  4. Yildirim, E., & Apaydin, H. (2021). Zinc and magnesium levels of pregnant women with restless leg syndrome and their relationship with anxiety: A case-control study. Biological Trace Element Research, 199(5), 1674-1685.
  5. Yang, Y., Ye, H., He, Q., Zhang, X., Yu, B., Yang, J., & Chen, J. (2019). Association between predialysis hypermagnesaemia and morbidity of uraemic restless legs syndrome in maintenance haemodialysis patients: A retrospective observational study in Zhejiang, China. BMJ open, 9(7), e027970.
  6. Garrison, S. R., Korownyk, C. S., Kolber, M. R., Allan, G. M., Musini, V. M., Sekhon, R. K., & Dugré, N. (2020). Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews, (9).
  7. Yu, A.S. (2022, January 12). Hypomagnesemia: Causes of hypomagnesemia. In M. Emmett & R. H. Sterns (Eds.). UpToDate., Retrieved November 1, 2022, from
  8. Volpe, S. L. (2013). Magnesium in disease prevention and overall health. Advances in Nutrition, 4(3), 378S-383S.
  9. Yu, A. S. (2022, May 19). Hypermagnesemia: Causes, symptoms, and treatment. In M. Emmett & R. H. Sterns (Eds.). UpToDate., Retrieved November 1, 2022, from

Learn More About Sleep Aids

Natural Sleep Aids

By Eric Suni November 8, 2023

Side Effects of Sleep Medication

By Danielle Pacheco November 8, 2023

Over the Counter Sleep Aids

By Danielle Pacheco November 8, 2023

How To Use Sleep Medications Safely

By Danielle Pacheco November 8, 2023

Compare Sleep Aids

By Eric Suni November 8, 2023

CBD as a Sleep Aid

By Danielle Pacheco November 8, 2023

CBN for Sleep

By Danielle Pacheco November 8, 2023

Finding Reputable Sleep Supplements

By Jay Summer November 8, 2023