Dr. Amy Wolkin is a physical therapist based in Atlanta, GA. After graduating from Wellesley College in 2012, she pursued dual graduate degrees at Emory University. She graduated in 2017 with her Master of Business Administration and Doctor of Physical Therapy degrees. Her clinical interests are outpatient orthopedics, women’s health, and pediatric sports medicine. She has advanced training in dry needling and pelvic floor physical therapy.
Medically Reviewed by Amy Wolkin, DPT, MBA

Does magnesium help you sleep? In short, yes. Using magnesium for sleep is a great, natural way to get some rest at night. While this mineral is incredibly important to your body overall, it’s not one that your body actually produces, so you have to find it in food and supplements. Here, we’ll discuss all things magnesium and sleep, including the best time to take magnesium, the relationship between magnesium glycinate and sleep, the side effects of too much magnesium and more.

What is Magnesium?

Magnesium is a mineral. Though it’s essential in helping your body function, it’s not a substance that your body produces. We get this mineral from supplements and our diets, and it contributes to keeping muscles healthy, keeping bones strong, regulating blood pressure, and, of course, helping us sleep. About half the magnesium in your body can be found in your bones, and the rest is distributed around, mainly in your soft tissue. 

According to the National Institutes of Health, women need about 310-320 mg of magnesium in a day, and men need about 400-420 mg of magnesium a day. 

How Does Magnesium Improve Sleep?

There are a few different ways that magnesium can affect your sleep. Because this mineral is so crucial in helping your body with a variety of things, that means there are myriad ways that can, in turn, help you sleep better

Improves sleeplessness

Of course, the primary way magnesium improves sleep is by getting right to the core of insomnia. Proper levels of magnesium can regulate the amino acid GABA, according to studies, which helps your brain shut off and welcome sleep.

Less stress

Magnesium helps you manage stress and anxiety. It works by regulating the sympathetic and parasympathetic nervous systems, finding a balance and helping your body deal with stress. With magnesium’s assistance, your systems can remain even-keeled, and with less stress, you’re bound to sleep better.


Magnesium, similarly to potassium, can help stop your muscles from cramping. This can help in a couple of ways. Some studies have shown that some magnesium combos have decreased nighttime muscle cramps, making it more comfortable to sleep. It’s also thought that magnesium can help prevent restless leg syndrome because it keeps your legs from locking up. Magnesium can also be beneficial for pregnant women who experience any muscle spasms during the night.

Emotional distress

Magnesium can help with emotions as well. It’s been shown to help with depression, though there hasn’t been much research done on this yet. There has been a correlation, though, between magnesium supplements and reduced depression symptoms, which, in turn, has led to improved sleep.

Sources Of Magnesium

You can, of course, get magnesium from foods, but there are other places to reap the benefits of this mineral. Because it’s not naturally produced by the body, it’s important to take magnesium every day. Your body needs a few hundred milligrams of it every day to help regulate everything, so here’s where you can find magnesium.


It’s pretty easy to get your daily recommended amount of magnesium from your diet alone, as long as you’re a pretty healthy eater. Magnesium is found in a lot of foods, including:

  • Dairy milk
  • Soy milk
  • Fish like halibut and salmon
  • Legumes
  • Vegetables like leafy greens, squash, broccoli, and avocados
  • Seeds and nuts like cashews, almonds, sunflower seeds, and sesame seeds
  • Peanut butter
  • Bananas
  • Beef and chicken


There are a few ways to take in a magnesium supplement. Some of them will be pure magnesium, but some are a combination. Magnesium citrate, for example, is a mixture of the two that not only helps you sleep but can also calm you down. Although, be careful how much you take because it’s also a known laxative.

Magnesium glycinate is another supplement that’s great for sleep because glycine is also an amino acid that promotes sleep. These two together have been proven to improve sleep.

What Happens When You Don’t Have Enough Magnesium? 

Not having enough magnesium in your body will do more than affect your sleep. As we said, it’s one of those minerals that does a lot of things for you, so not having enough in your body can lead to larger issues. 

  • Osteoporosis: Because magnesium is so essential to bone health, without enough of it, your bones may not be as strong, leading to osteoporosis.
  • Stroke: There’s been some research done that shows an increased intake of magnesium lowered the risk of stroke; thus, a magnesium deficiency can increase the risk of stroke.
  • Cardiovascular disease: Heart problems are already so prevalent, and studies have proven that having enough magnesium in your body can lower your risk. 
  • High blood pressure: Supplemental magnesium can also manage blood pressure, which means a deficiency in this mineral puts you at risk for high blood pressure.

Additional Health Benefits

Have we mentioned that magnesium goes a long way in helping your body? Because it does. Yes, it can help you sleep better at night, but it can also help with all of these things too:

  • Improved mood
  • Less stress
  • Pain relief
  • Alertness
  • Bone health
  • Metabolic health

Potential Side Effects of Magnesium

Adults should not take more than 350 mg of magnesium per day. Most likely, you won’t do this with your diet, but taking too many magnesium supplements could cause side effects like diarrhea, nausea, and cramping, and extreme overdoses of magnesium can lead to heart problems, coma, and even death. However, you’d have to consume a very large amount of magnesium to reach these levels.


Which form of magnesium is best for sleep?The best magnesium for sleep is either magnesium glycinate or magnesium citrate. Some studies claim that magnesium citrate can relieve symptoms of depression and anxiety, but is better known as a laxative. Meanwhile, magnesium glycinate is a combination with an aminoacid that can promote a healthy circadian rhythm and muscle relaxation, thus helping improve the quantity and quality of your sleep. Both are combined with a second substance that promotes sleep.
How much magnesium should I take for sleep?When it comes to how much magnesium to sleep, it depends. Women should have around 310-320 mg of magnesium in a day, and men should have around 400-420 mg of magnesium in a day. These amounts will promote better health and better sleep. If you’re looking to use magnesium specifically to help you fall asleep, you can take a supplement close to bedtime to finish out the amount for the day.
How long does it take for magnesium to work for sleep?Supplemental magnesium takes about an hour to two hours to kick in, so you should take it when you want to sleep.
What time of day should you take magnesium?The best time of day to take magnesium is one to two hours before you want to sleep, whenever that is during your day. If you’re on a typical schedule, that means you should take your magnesium at night while you’re getting ready for bed so that by the time you want to sleep, you’ll be tired.
Magnesium vs. Melatonin: which is better?Melatonin is naturally produced by your body specifically for sleeping purposes, whereas magnesium is not. Though magnesium can help you sleep, it’s not its only purpose for the body. More research has been done on melatonin’s effects, and there isn’t much information about combining both melatonin and magnesium supplements, if you’re concerned about what each can do for you, speak with your healthcare provider.