Magnesium and Sleep

By McKenzie Hyde
Last Updated On August 25th, 2020

Your body is already equipped with all the tools you need for a good night’s rest. Sometimes, however, your sleep cycle needs a little fine-tuning. When it comes to getting…

Fact checked by
 Michele Roberge Michele Roberge

Michele Roberge

Michele Roberge is a Registered Polysomnographic Technologist and a Registered Radiologic Technologist. Michele currently leads a 4-bed, hospital-based sleep disorder center in Florida, which is also home to one of the largest sleep apnea support groups in the nation.

Magnesium and Sleep

Your body is already equipped with all the tools you need for a good night’s rest. Sometimes, however, your sleep cycle needs a little fine-tuning. When it comes to getting more quality sleep, there are a lot of remedies to choose from.

One healthy, natural solution to getting better sleep is to incorporate the recommended dose of magnesium, a mineral found in the body and in many foods, into your diet. Magnesium, along with its myriad of other health benefits, can help you fall asleep deeper and quicker, leaving you more rejuvenated for the day ahead.

Enjoy 30% OFF any Amerisleep Mattress

Claim deal now

While a great deal of research has been done on the subject, there is a spectrum of controversial, yet scientific opinions about the link between sleep and magnesium. An overwhelming majority of the current research reports a positive correlation between the two.

What is Magnesium?

Magnesium is one of the 24 essential vitamins and minerals humans need to maintain a healthy lifestyle. Few dietary minerals are more influential to your body’s physical and mental health. We’ll explore some of the additional benefits below.

While our bodies need large quantities of this essential mineral, we do not produce magnesium independently, and therefore must rely on diet or supplements to get the recommended dose. The National Institutes of Health recommends 310-320 mg a day for women ages 19 and older; men in the same age bracket should take 400-420 mg a day.

On average, a healthy adult will have about 25 mg of magnesium in their system, well below the recommended levels. About half of your magnesium is found in your bones. The other 40-50 percent is in your soft tissue.

Sixty-eight percent of American adults do not consume enough magnesium in their diet or through supplemental means. In addition to poor sleep, other negative side effects linked to a magnesium deficiency include hypertension, cardiovascular disease, and type 2 diabetes.

How Does Magnesium Improve Sleep?

Many people with a magnesium deficiency suffer from insomnia. Women especially are prone to low levels of magnesium. Several studies have shown that increasing your magnesium intake improves your sleep performance.

Magnesium effectively reduced insomnia among elderly adults, according to an Iranian study in 2012. The study reported that nearly 50 percent of older adults suffer from insomnia.

When study participants added magnesium supplements to their diets, they experienced longer sleep times, fewer early morning wakings, and better sleep efficiency (the amount of time spent in bed compared to the amount of time asleep).

GABA Levels and Magnesium

Some people suffer from insomnia because they can’t seem to turn their brain off at night. Magnesium helps to slow down your thinking by regulating a neurotransmitter called GABA.

GABA (short for Gamma-Aminobutyric acid) is an important amino acid that plays a key role in your overall sleep health. One of the primary functions of GABA is, essentially, to help your brain power down for the night. This neurotransmitter slows down the communication between your brain and your central nervous system, helping you relax, de-stress, and ultimately, fall asleep.

Magnesium helps your body maintain healthy levels of GABA, allowing for more restorative sleep. Additionally, GABA can help calm both body and mind while you prepare for sleep. This calming ritual is a natural boost to your circadian rhythms.

Think of your circadian rhythm as your internal clock; it cues your brain to feel sleepy when the sun goes down and more awake when the sun rises. A healthy circadian rhythm is a natural routine that allows for deeper, quality sleep.

Supplemental Magnesium Regulates Stress and Anxiety

German scientists recently tested the link between magnesium and stress when it comes to sleep. Their results found that increasing the participant’s daily magnesium intake helped participants regulate both the sympathetic and parasympathetic nervous systems.

Regulating these two systems is critical for healthy sleep. The parasympathetic nervous system, often called the “rest and digest” system, allows your body to prepare for sleep by slowing down your heart rate and relaxing other systems in your body. The sympathetic nervous system, on the other hand, is also known as your “fight-or-flight” response system, leaving you in a heightened state of arousal.

When these two systems reach equilibrium through the use of magnesium supplements, participants in the German study saw a decrease in sleep disorders, irritability, poor concentration, and depression.

Restless Leg Syndrome

In addition to improving your overall quality of sleep, magnesium can also improve restless leg syndrome, a condition that causes insomnia and may affect up to 10 percent of the population.

Restless leg syndrome is a disorder that causes an uncomfortable and uncontrollable urge to move your legs. The disconcerting sensation has also been described by some as a “pins and needles” feeling. According to Michele Roberge, RT(R), RPSGT, “Restless leg syndrome can happen during the day or night, usually during or just after periods of inactivity and is usually relieved with activity. [Because of that,] RLS can be exacerbated at bedtime while inactive and trying to fall asleep.”  To relive the sensation, many people move their legs around, often keeping themselves awake during the night.

Roberge adds, “The parasomnia ([a] disorder that occurs during sleep) that is commonly associated with RLS is known as Periodic Limb Movement Disorder. PLMD is [the] rhythmic movement of the limbs, most commonly the legs, during sleep. According to The Cleveland Clinic Guide to Sleep Disorders by Nancy Foldvary-Schaefer, DO approximately 80% of patients with RLS also suffer from PLMD.”

While treatment for restless leg syndrome is still evolving, one study found magnesium was an effective form of natural therapy.

Other studies have also shown that magnesium salts have been beneficial in reducing leg cramps in pregnant women. Additional research indicates that magnesium citrate has helped alleviate nighttime leg aches, cramps, and pains in all adults, not just pregnant women.

Digestion and Gut Health

Magnesium is important to gut health, a relatively new branch of research. One of the jobs of magnesium is to relax muscles in the stomach and intestines, neutralize stomach acids, and promote a healthy digestive tract.

For this reason, high doses of magnesium are often used to relieve constipation and soothe heartburn. A diet of magnesium-rich foods helps to offset these uncomfortable conditions that have direct ties to the gut.

While research examining the link between magnesium and gut health is in its primitive stages, a 2018 study using male rats found that a diet high in magnesium led to a healthy gut among its test subjects.

Additional research out of Denmark found that adults deficient in magnesium may be more prone to symptoms of depression and anxiety because of an imbalance of healthy microbiota in the gut.

Depression and Mood

Depression and other mood disorders can impair sleep, causing restlessness and insomnia. These disorders are incredibly widespread. According to the World Health Organization, more than 263 million people of all ages across the globe suffer from depression.

Magnesium has been shown to be an effective natural treatment. A study published in the Journal of the American Board of Family Medicine found a link between magnesium supplementation and fewer symptoms of depression. This link was even higher in younger adults.

Though prior research had been inconclusive, this 2015 study found that magnesium impacts several neurotransmitters that affect depression. Overall, when participants took higher doses of magnesium, their depressive symptoms improved. Magnesium was also found to improve additional mood disorders such as postpartum depression and chronic fatigue.

Muscle Health

Magnesium works in tandem with other essential vitamins and minerals like calcium and potassium. Because of this, magnesium plays a key role in how well your muscles— including your heart—  function.

Additionally, magnesium helps your muscles to contract and as a result, produce energy and protein. This is because magnesium works with more than 300 enzymes in your body to allow it to function properly.

Sources of Magnesium

magnesium and sleep

Ideally, most experts recommend getting the suggested dose of magnesium from your food. In fact, some research shows that people who regularly eat a healthy, balanced diet are unlikely to suffer from magnesium deficiency at all.

Regardless, there are many ways to up your magnesium intake if you want to regulate or increase this essential mineral in your system; most common are diet and supplements.

Magnesium in Food

If you’re looking to up your magnesium intake, examine your diet first. Harvard Medical School reports that most people get enough magnesium from a healthy diet with foods high in magnesium.

According to the National Institute of Health, some processed foods strip away nutrients, drastically lowering the magnesium content within the food. We recommend eating whole, unprocessed foods for the best source of dietary magnesium.

Water—  tap, bottled or mineral— can be another excellent source of dietary magnesium. However, not all water is created equal, as the amounts of magnesium present in the water may vary by brand and location.

The US Department of Agriculture has identified the following foods as the richest in magnesium, listed in descending order: almonds, spinach (boiled), cashews, peanuts, and shredded wheat cereal.

Magnesium-rich foods include:

  • Dark leafy greens
  • Seeds and nuts, especially cashews, almonds, sunflower, and sesame seeds
  • Squash, broccoli
  • Peanut butter
  • Legumes
  • Soymilk
  • Dairy
  • Avocado
  • Bananas
  • Salmon, halibut
  • Beef, chicken breast

Supplemental Magnesium

If your diet is still not giving you the recommended daily dose of this essential mineral, many supplemental options for magnesium are available at your local drug store. While it comes in many forms, all of which will help regulate your GABA levels and lead to restful sleep, knowing the different types of dietary supplements available can be helpful.

When you’re making your selection either online or at the drugstore, keep in mind that some magnesium supplements include a blend of different types of magnesium, whereas some you can purchase individually.

Magnesium Glycinate

Glycine is another sleep-inducing amino acid. One form of supplemental magnesium is magnesium glycinate. This is one of the most absorbable forms of magnesium you can take. Studies have shown that glycine improves sleep quality and promotes natural, healthy sleep patterns, including healthy REM cycles.

Magnesium glycinate is normally included in many over-the-counter magnesium supplements, but always be sure to check, as it is recommended especially for improving sleep.

Magnesium Citrate

Feeling stressed or tense? Consider upping your magnesium citrate intake.

Many common magnesium supplements contain magnesium citrate. In addition to soothing muscle cramps, magnesium citrate has calming properties, helping your mind and body relax.

Magnesium Oil

Magnesium oil is a topical remedy that can help relax your muscles as well as boost the health of your skin. It is most often a mixture of water and magnesium chloride. Many people use it for its calming purposes in baths or as a topical oil, as it’s also sold in a spray form.

While no concrete research has proven the benefits of magnesium oil, it is still a popular option for a magnesium supplement.

Other common forms of magnesium include magnesium sulfate (found in Epsom salts),  magnesium oxide, magnesium threonate, and magnesium malate. If you’re uncertain or experience any adverse side effects, be sure to talk with your doctor.

What Happens When You Don’t Have Enough Magnesium?

A 2012 study from the International Life Sciences Institute reported that some health risks from a magnesium deficiency include type 2 diabetes, migraine headaches, asthma, colon cancer, and hypertension to name a few.

  • Cardiovascular disease: Though the prevalence of heart disease is both devastating and wide-spread, research has shown that higher levels of magnesium showed a reduced risk of both cardiovascular disease and heart disease.
  • Hypertension: Low magnesium levels for an extended period of time may be connected with hypertension and cardiovascular disease. While studies have shown that supplemental magnesium and a diet of magnesium-rich foods only helped lower blood pressure marginally, we recommend a lifelong effort of maintaining healthy magnesium levels.
  • Stroke: One study showed that higher doses of magnesium (an additional 100 mg a day) decreased the risk of stroke by 8 percent in the study participants.
  • Type 2 diabetes: Because of magnesium’s critical role in balancing glucose levels, diets rich in magnesium are linked to a significantly lower risk of diabetes, according to the National Institutes of Health.
  • Osteoporosis: Because it activates the essential, bone-fortifying elements found in Vitamin D, magnesium is critical to healthy bone development, and has also been shown to ward off osteoporosis.
  • Migraine headaches: Though research in this area is limited, there is enough evidence to support the idea that magnesium therapy— high doses of magnesium prescribed by a healthcare professional— could be beneficial in treating migraine headaches.

Additional Health Benefits of Magnesium

While a pattern of better, restorative sleep can improve your overall health, magnesium also touts additional health benefits.

Magnesium assists more than 300 enzymes in your body, keeping you feeling balanced and healthy. Additional mental and physical benefits include:

  • Lower stress, better mood
  • Bone health
  • Metabolic health
  • Pain relief
  • Better attention span
  • Better athletic performance

Potential Side Effects

Like with all things, moderation is key. Always be sure to follow the recommended dosages and any advice from your healthcare provider.

Some people experience stomach cramping after taking too much magnesium (around 600 mg a day). This high dosage, especially supplements with large doses of magnesium oxide, can cause a laxative effect, ironically keeping you up at night, rather than providing the sleep-inducing benefits it’s well-known for.

Though your body will naturally void any excess vitamins and minerals, your kidneys ensure you don’t excrete too much magnesium because of your body’s need for it. Even still, we recommend being mindful of how much you’re consuming regularly, and always talk to your doctor should you have additional concerns.

Some drugs interact poorly with magnesium, so be sure to check with your doctor before beginning any supplemental regimen. If you have chronic kidney disease, we recommend only using supplements prescribed by your doctor.


Which form of magnesium is best for sleep?

Because it’s combined with an additional sleep aid and amino acid, glycine, magnesium glycinate is one of the most common magnesium supplements used for achieving better sleep.

Is magnesium or melatonin better for sleep?

While both can act as a sleep aid, magnesium and melatonin perform different roles in the body. Melatonin is a hormone and antioxidant; magnesium is a mineral. While they can both help you to fall asleep, we recommend learning the differences in how each substance works with your body to fall asleep. We caution against relying on any supplement to help you sleep; first, focus on your sleep hygiene and sleep habits.

What is the best time to take magnesium?

If you plan on using magnesium supplements as a sleep aid, we recommend taking it 1-2 hours before heading to bed. Consider adding magnesium to your sleep routine.

Can magnesium cause insomnia?

Magnesium does not cause insomnia. A magnesium deficiency, however, can. As discussed above in this article, we recommend healthy doses of magnesium through diet or supplements to help combat insomnia.

This article is for informational purposes and should not replace advice from your doctor or other medical professional.

About the author

McKenzie Hyde is a Certified Sleep Science Coach and a full-time writer focused on sleep health and the mattress industry. She currently writes articles on a variety of topics, ranging from sleep hygiene to the newest trends in the mattress and bedding industry. Just some of the topics she has covered include best sleep practices for students, the consequences of going without sleep, and choosing the right bed if you suffer from back pain. McKenzie Hyde holds a Master of Arts degree from Utah State University where she studied literature and writing. While there, she taught argumentative writing and wrote a variety of articles and analyses for literary and academic journals.

View all posts

You’ll enjoy these posts

Based on your reading history, we think you’ll enjoy these posts…

Discover the ultimate sleep system

Choose your mattress

Shop top-rated mattresses with proven sleep-boosting materials.

Browse Mattresses

Get a pillow

We have the perfect pillow to pair with your mattress.

Browse Pillows

Pick out bedding

Bring out the best in your mattress with our soft and breathable bedding.

Browse Bedding