Already have an account?
Get back to the

Can’t Fall Asleep? One of These Vitamin or Mineral Deficiencies May Be the Culprit

Several essential nutrients help regulate our sleep and wake cycles.


A few months ago, I was having difficulty falling asleep. I tried everything I could think of; I drank warm decaf tea in the evening, practiced stretches and deep breathing, left my phone outside my bedroom (so I wouldn’t be tempted to doom scroll), and went to bed at a decent hour. Despite feeling tired, my mind would race and I would toss and turn for an hour or two — sometimes three — before finally falling asleep. What was going on? I turned to the internet for answers.

Stress was the top hypthosesis, along with poor sleep habits and eating late in the evening. I wasn’t particularly stressed at the time or eating late, so neither of those seemed to be the issue. Having poor sleep habits was accurate — but that was due to, well, my lack of sleep! Then, I found another explanation that gave me pause: micronutrient deficiencies. I began taking a daily multivitamin and a magnesium supplement (SmartyPants Women’s Complete and Nature’s Bounty Magnesium Glycinate), and in about a month, I found myself falling asleep easily. While I can’t be certain that the vitamins did the trick or that I had any deficiencies (a number of other factors could have contributed, including exercise levels and dietary habits), I do think the micronutrient boost was an important step. Keep reading to learn why.

Micronutrient Deficiencies That May Affect Your Sleep Quality

A wide range of factors can make it hard to fall asleep, including anxiety, stress, certain medications (such as antidepressants or asthma inhalers), and medical conditions like chronic pain, acid reflux, and heart disease. If you don’t have any of these conditions, however, you may want to analyze your diet for potential deficiencies. Below, we take a look at some micronutrient deficiencies that may make it hard to fall asleep.


The body uses magnesium in many ways: It helps synthesize protein to form new muscle, promotes healthy muscle function, aids in blood sugar control, and helps regulate blood pressure. It also helps transport calcium and potassium into nerve cells, thereby helping with proper nerve function.

Why magnesium may improve sleep patterns: One high-quality study from 2016 found magnesium supplements helped activate the parasympathetic nervous system (PNS) in participants. (The PNS is a network of nerves that regulates automatic functions and relaxes the body. It’s known as the “rest and digest” system.) It also helps regulate your brain’s production of melatonin; indeed, a 2012 study found that 500 milligrams of magnesium daily for eight weeks increased sleep time and quality of sleep in mature adults.

Foods that contain magnesium: Pumpkin seeds (1 ounce, 156 mg), chia seeds (1 ounce, 111 mg), almonds (1 ounce roasted, 80 mg), spinach (½ cup cooked, 78 mg), cashews (1 ounce roasted, 74 mg), peanuts (¼ cup roasted, 63 mg), soymilk (1 cup, plain or vanilla, 61 mg). The recommended daily allotment (RDA) for women over 31 is 320 milligrams daily.

Vitamin D

Often called the sunshine vitamin, vitamin D helps the body absorb calcium and phosphate in the gut, helping you maintain strong bones and proper muscle function. In addition, this all-important nutrient helps reduce inflammation and improves immune system function.

Why vitamin D may improve sleep patterns: A growing body of research supports the theory that vitamin D helps regulate sleep. For instance, a 2018 analysis of nine studies showed that a deficiency is linked to sleep disorders and poor sleep quality. Another study from 2020 found that the areas of the brain controlling sleep regulation contain vitamin D receptors. That same study also noted that the vitamin is involved in melatonin production and may help regulate a person’s circadian rhythm. Lastly, a 2022 analysis of 19 studies found that vitamin D supplementation is promising in improving sleep quality, though it’s unclear whether it also improves sleep quantity and sleep disorders.

Foods that contain vitamin D: Few foods naturally contain vitamin D, though the best natural sources are cod liver oil, fatty fish, like trout, salmon, tuna, and mackerel. Milk, milk alternatives, and orange juice in the US is often fortified with vitamin D, making these drinks another option. The RDA for women over 19 is 15 milligrams (600 IU) daily, and the daily upper limit is 4,000 IU.


The most abundant mineral in the body, calcium is incredibly important for strong bones and teeth. However, that’s not all it does. This mineral helps muscles move and nerves communicate. It also helps blood vessels transport blood and aids in the release of hormones.

Why calcium may improve sleep patterns: According to Dr. Linda J. Dobberstein, DC, calcium supports proper hormone regulation for better sleep. It also helps convert tryptophan into serotonin, which then becomes melatonin in the brain. Furthermore, studies have linked low calcium levels with poor sleep. For instance, a 2013 study found that participants low in calcium (and other nutrients) had a harder time falling asleep than other participants. By contrast, participants who consumed more calcium tended to have an easier time falling asleep.

Foods that contain calcium: Milk (2%, 1 cup, 250 mg), yogurt (plain, low fat, 1 cup, 448 mg), cheese (grated parmesan, about 1 ounce, 300 mg), canned salmon (3 ounces, 168 mg), kale (raw, 1 cup, 52.3 mg), broccoli, bok choy (raw, 1 cup, 73.5 mg) The RDA for women over 51 years old is 1,200 milligrams of calcium daily.

Note: It’s relatively easy to reach 1,200 mg of calcium each day, but if you struggle to reach that amount, consider a calcium supplement. A tasty one that I like: Viactiv Calcium and Vitamin D Chocolate Chews.

Bottom Line

While a combination of issues likely contributes to insomnia — from stress to excess screen time — poor sleep quality could also be a sign that you have one or more nutrient deficiencies. Getting adequate amounts of magnesium, vitamin D, and calcium is just one step in a comprehensive treatment plan, but it could very well be an important one. And if you suspect that you have any deficiencies, ask your doctor for a blood test. That way, you will know which nutrient levels are low.

This content is not a substitute for professional medical advice or diagnosis. Always consult your physician before pursuing any treatment plan.

Use left and right arrow keys to navigate between menu items. Use right arrow key to move into submenus. Use escape to exit the menu. Use up and down arrow keys to explore. Use left arrow key to move back to the parent list.