When you buy through our links, we may earn a commission. Products or services may be offered by an affiliated entity. Learn more.

Key Takeaways
  • Magnesium can help you sleep longer, get better quality sleep, and feel less tired.
  • Experts recommend taking no more than 350 milligrams of magnesium for sleep
  • Magnesium is found in foods like nuts, leafy greens, whole grains, dairy, and soy products.
  • Consult your doctor before adding any supplements to your diet.

Nearly 50% of US adults and children might not consume the amount of magnesium their bodies need. Since magnesium has been found to play a role in sleep, low levels of the mineral may result in sleep troubles. We explore what magnesium is, how it might benefit sleep, and what to look for in a  magnesium supplement.

What Is Magnesium?

Magnesium is an essential mineral in the body that plays a role in nerve and muscle function, bone development, blood sugar control, and heart rhythm consistency. Research suggests that magnesium helps people keep healthy sleep schedules and get good quality sleep.

To maintain adequate magnesium levels, people must replenish their stores by eating magnesium-rich foods daily. People who want to ensure that they are consuming enough magnesium can also take dietary supplements. The Recommended Dietary Allowance (RDA) for magnesium falls between 310 and 420 milligrams for adults, depending on age, sex, and pregnancy status.

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

Get to the root of your sleep problems

Magnesium can help, but it’s best to find the source of your sleep issues. Answer these questions to better understand your sleep.

Please select all options

Benefits of Magnesium for Sleep

Higher levels of magnesium in the body are associated with better sleep, longer sleep times, and less tiredness during the day. Studies of older adults also found that magnesium supplementation helped with falling asleep faster and protected against waking up earlier than intended. 

Experts haven’t yet found the exact ways in which magnesium impacts sleep. Some evidence suggests that magnesium impacts the way certain chemicals act in the brain. The chemicals thought to be affected by magnesium include NMDA, GABA, melatonin, renin, and cortisol, all of which may impact how relaxed or tired a person feels.

Magnesium and Insomnia

A few studies suggest that magnesium supplementation can help with insomnia, a disorder that involves trouble falling asleep or staying asleep. In one study, adults in their 60s slept longer, spent less time awake in bed, and received lower scores on an insomnia scale when taking a magnesium supplement. 

More research is needed to determine how magnesium supplements might impact people of other ages who experience insomnia. However, some people take magnesium for insomnia and anecdotally report that it helps.

“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.”
Headshot of Dr. Abhinav Singh
Dr. Abhinav Singh
Sleep Medicine Physician, MD

Magnesium and Restless Legs Syndrome

Many people take magnesium supplements for leg cramps and restless legs syndrome, a sleep disorder that causes uncomfortable sensations in the legs that may make it difficult to sleep. Research suggests magnesium may specifically help with nighttime leg cramps during pregnancy, since they might be caused by low magnesium levels.

Lower magnesium levels may also be linked to more severe cases of restless legs syndrome, but more research is needed. Currently, experts say that there isn’t enough evidence to know for sure if magnesium can treat restless legs syndrome. However, taking magnesium supplements at recommended doses likely won’t have negative effects.

RS_TRProduct_NoCapsule

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 vs. Melatonin: What’s the Difference?

Magnesium is an essential mineral people consume through food, while melatonin is a hormone produced by the brain. Both appear to play a role in sleep quality, sleep timing, and circadian rhythms, which are physical changes that happen over each 24-hour period. Both magnesium and melatonin are also available in supplement form.

A person’s brain creates melatonin in response to darkness, and this increase in melatonin makes them feel tired and want to sleep. For this reason, people sometimes take melatonin supplements for sleep or when they want to change their sleep schedules, such as after traveling far distances.

Magnesium may impact sleep because of the way it affects other chemicals in the brain, including melatonin. Having higher magnesium levels and taking magnesium supplements are both linked to better sleep.

How to Pick Magnesium Supplements for Sleep

Since the Food and Drug Administration (FDA) doesn’t regulate dietary supplements or approve their safety in the same way they do prescription drugs, it’s important to carefully choose which supplements you purchase. Keep these factors in mind while looking:

  • Formulation: Magnesium comes in multiple forms, and some may be easier for the body to absorb than others. Specifically, types of magnesium glycinate may be better absorbed. When a supplement is better absorbed, it’s less likely to cause side effects. 
  • Dose: Experts recommend sticking to 350 milligrams of magnesium supplements per day or less in order to avoid negative effects. However, many brands sell magnesium supplements in dosages that are higher than this.
  • Brand: Look for companies that have their supplements undergo third-party testing. This testing can ensure that the supplements you buy are not contaminated by mold or heavy metals and that their contents match what is listed on the label.

Magnesium glycinate is one form of magnesium easily absorbed by the body and recommended by sleep experts to promote calm, relaxation, and improved sleep.

Frequently Asked Questions About Magnesium

How Much Magnesium Should I Take?

The amount of magnesium a person should consume each day depends on their age and existing health conditions. Generally, people should try not to take more than 350 milligrams of magnesium supplements per day in order to avoid side effects, according to the Food and Nutrition Board (FNB) at the Institute of Medicine of the National Academies.

What Foods Are High in Magnesium?

Foods high in magnesium include seeds, leafy greens, nuts, beans, and rice. Roasted pumpkin seeds and chia seeds are the foods with the highest magnesium content. Nuts with the highest amount of magnesium include almonds, cashews, and peanuts. Some fish, like salmon and halibut, also contain magnesium.

Does Magnesium Have Any Side Effects?

Consuming more than 350 milligrams worth of magnesium supplements in one day may cause side effects like diarrhea, nausea, and abdominal cramps. Certain forms of magnesium, like magnesium carbonate, magnesium chloride, magnesium gluconate, and magnesium oxide may be more likely to cause side effects.

Is It Safe to Take Magnesium Every Day?

Magnesium supplements are safe for most people to take daily, but taking more than 350 milligrams may cause side effects. Magnesium supplements can interact with some prescription drugs, so talk with a doctor before beginning magnesium.

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

References
6 Sources

  1. Arab, A., Rafie, N., Amani, R., & Shirani, F. (2023). The role of magnesium in sleep health: A systematic review of available literature. Biological Trace Element Research, 201(1), 121–128.

    https://pubmed.ncbi.nlm.nih.gov/35184264/
  2. National Institutes of Health Office of Dietary Supplements. (2022, June 2). Magnesium. National Institutes of Health Office of Dietary Supplements.

    https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
  3. Marshall, N. S., Serinel, Y., Killick, R., Child, J. M., Raisin, I., Berry, C. M., Lallukka, T., Wassing, R., Lee, R. W., Ratnavadivel, R., Vedam, H., Grunstein, R., Wong, K. K., Hoyos, C. M., Cayanan, E. A., Comas, M., Chapman, J. L., & Yee, B. J. (2019). Magnesium supplementation for the treatment of restless legs syndrome and periodic limb movement disorder: A systematic review. Sleep Medicine Reviews, 48, 101218.

    https://pubmed.ncbi.nlm.nih.gov/31678660/
  4. Winkelman, J. W. (2022, May 6). Nocturnal leg cramps. In I. N. Targoff & J. M. Shefner (Eds.). UpToDate.

    https://www.uptodate.com/contents/nocturnal-leg-cramps
  5. Costello, R., Rosanoff, A., Nielsen, F., & West, C. (2023). Perspective: Call for re-evaluation of the tolerable upper intake level for magnesium supplementation in adults. Advances in Nutrition (Bethesda, Md.), 14(5), 973–982.

    https://pubmed.ncbi.nlm.nih.gov/37487817/
  6. Schuette, S. A., Lashner, B. A., & Janghorbani, M. (1994, September 1). Bioavailability of magnesium diglycinate vs magnesium oxide in patients with ileal resection. Journal of Parenteral and Enteral Nutrition, 18(5), 430–435.

    https://aspenjournals.onlinelibrary.wiley.com/doi/abs/10.1177/0148607194018005430

Learn More About Sleep Aids

Does Chamomile Tea Make You Sleep?

By Jay Summer June 27, 2024

The Best 7 Teas for Sleep

By Tom Ryan, PhD April 24, 2024

Sleep Aids for Kids

By Danielle Pacheco April 2, 2024

Is CBD a Safe and Effective Sleep Aid?

By Danielle Pacheco April 2, 2024

Cannabis for Sleep

By Danielle Pacheco April 2, 2024

L-Theanine for Sleep

By Dr. Elizabeth Rausch-Phung March 28, 2024

Over the Counter Sleep Aids

By Danielle Pacheco March 26, 2024