If you intend to live a long and healthy life, sleep needs to be a priority. Anyone struggling with chronic disease — which is at least half the adult population in the U.S. — would be wise to take heed, as sleep cannot only contribute to the problem but also counteract any healthy lifestyle strategies you’re using to address it.

As a general guideline, seek to get right around eight hours of sleep every night. Anything below seven hours really starts to impact your health (if you’re an adult). The good news is there are many ways to improve your sleep, including nutrients, which is the main focus of this article. While I don’t recommend relying on sleep aids long-term, certain supplements can help improve sleep, and can be used while you’re implementing more permanent changes.

A number of vitamins, minerals, amino acids and hormones are also critical for sleep quality, and deficiency in one or more of them may be part of your problem if you’re struggling with poor sleep. Lastly, I’ll address two commonly overlooked environmental factors that can rob you of sleep, namely your exposure to blue light and electromagnetic fields (EMFs).

Three Vitamins That Improve Sleep

While you’re probably aware of one or more herbs that can help you sleep, few are aware that certain nutrient deficiencies can wreak havoc on your sleep. As noted by Drs. Arielle Levitan and Romy Block, who wrote “The Vitamin Solution: Two Doctors Clear the Confusion About Vitamins and Your Health,” vitamin deficiency is “an often-overlooked factor in sleep problems … We need adequate levels of key nutrients to get good quality sustained sleep.”1 Three vitamins known to have this kind of influence include:

• Vitamin D: A number of studies have linked low vitamin D to poor sleep quality,2 and have shown reaching and maintaining a vitamin D level of 60 to 80 ng/mL can improve sleep.3 According to the authors:

“Comparisons of brain regions associated with sleep-wake regulation and vitamin D target neurons in the diencephalon and several brainstem nuclei suggest direct central effects of vitamin D on sleep. We propose the hypothesis that sleep disorders have become epidemic because of widespread vitamin D deficiency.”

• Vitamin C: Research4 published in PLOS ONE found those with low vitamin C in their blood reported more trouble sleeping, and were more likely to experience interrupted sleep. Foods high in vitamin C include5 guavared and green bell pepperkiwi, oranges, strawberries, papaya and broccoli. If opting for a supplement, I’d recommend liposomal vitamin C, as it has better absorption.

• Vitamin B12: Low B12, which is extremely common in the general population but even more so among vegans and vegetarians, is known to cause neurological problems, including disturbed sleep. Levitan and Block recommend getting 250 to 500 micrograms (mcg) per day to avoid deficiency symptoms.

Minerals That Influence Sleep Quality

Similarly, certain minerals are important for sleep and can affect your sleep quality. Among them:

• MagnesiumMagnesium not only promotes muscle relaxation, it also helps your body produce melatonin. By boosting GABA, a nervous system relaxant, it also eases tension associated with stress. Dr. Carolyn Dean, medical advisory board member at the Nutritional Magnesium Association, suggests taking 600 milligrams (mg) of magnesium in divided doses throughout the day.

I prefer using magnesium malate, glycinate or threonate. If you have kidney failure or slow heart rate, fall back on eating more magnesium-rich foods instead, such as green leafy veggies, pumpkin seeds, sesame seeds, spirulina and raw nuts.

• Potassium: According to research6 published in the journal Sleep, potassium supplementation has a positive impact on sleep quality when taken daily for one week. Another study7 found potassium supplementation improved slow-wave sleep specifically, which is the deepest sleep cycle phase, during which your brain performs its most important cleanout processes.

Interestingly, the gene that controls the influx of potassium into cells also helps regulate sleep, and without potassium, your brain cannot produce the slow waves associated with deep sleep.

• Calcium: Calcium deficiency, meanwhile, has been shown to disrupt the rapid eye movement or REM cycle, also known as the dream cycle. In one study,8 when participants corrected their calcium deficiency, normal REM sleep was regained.  Foods high in calcium include9 organic, grass fed raw milk and other dairy products, finely powdered organic egg shells, Parmesan cheese, spinach, cowpeas, clams, okra and acorn squash.

If taking a calcium supplement, you may need to also adjust your intake of magnesium, vitamin D and vitamin K2, as all of these work in tandem. As just one example, the biological role of vitamin K2 is to move calcium into the proper areas while removing calcium from areas where it should not accumulate, such as your arteries and soft tissues. Lack of balance between these four nutrients is why calcium supplements have become associated with an increased risk of heart attack and stroke.