Many factors affect sleep, including diet. Research indicates that deficiencies in certain vitamins, such as vitamin B, C, and D, can harm sleep. Elevating the levels of these vitamins may help improve sleep.

Sleep and nutrition involve many interconnected systems in the body. Sufficient nutrients with a range of vitamins and minerals enable the body’s systems to work correctly.

Research indicates inadequate levels of vitamins A, C, D, E, and K, and magnesium may affect sleep. Supplementing some of these vitamins and minerals could increase sleep quality and duration.

In this article, we examine whether vitamins can improve sleep. We discuss the science behind it, home remedies and medications that may help sleep, and tips to get a better night’s sleep.

person sleepingShare on Pinterest
Jodie Johnson/Stocksy

Studies suggest that deficiencies in certain vitamins and minerals may contribute to sleep problems.

Some research indicates that people may improve sleep by managing their diet, but there is not currently enough evidence to say whether managing specific vitamins and minerals affects sleep. Research in this area is ongoing and has had some promising results.

To discover more evidence-based information and resources for the science of sleep, visit our dedicated hub.

Was this helpful?

Current research indicates the following vitamins may benefit sleep:

Vitamin D

Low levels of vitamin D could be a risk factor for unhealthy sleep. A 2018 study indicates an association between low vitamin D, short sleep duration, and poor sleep quality.

Researchers are unclear about the underlying mechanisms behind vitamin D deficiency and sleep disorders, but they have several theories.

Vitamin D receptors are in nearly all body tissue and distributed widely throughout the brain in the following areas:

  • prefrontal cortex
  • hypothalamus
  • midbrain central gray
  • substantia nigra
  • raphe nuclei

These areas of the brain play important roles in sleep regulation, meaning vitamin D levels could affect the sleep-wake cycle.

A few studies into how often diseases occur in different people and why suggest that taking vitamin D supplements may increase sleep duration and quality. However, researchers need to conduct more studies to check these findings.

Learn more about vitamin D.

Vitamin C

A person’s vitamin C levels may impact their sleep.

Research comparing people with short and long sleep found reduced concentrations of vitamin C among those sleeping for the shortest time. Other evidence indicates that people sleeping the recommended 7–8 hours each day have higher plasma levels of vitamin C than short sleepers.

Although there appears to be a link between vitamin C levels and sleep, researchers have yet to determine whether supplementing vitamin C will help someone sleep longer. However, some research involving cancer patients has found that increasing vitamin C may improve sleep disturbances.

Learn more about vitamin C.


Magnesium is a mineral naturally present in many foods. Researchers do not yet fully understand the links between magnesium and sleep. However, magnesium deficiency may lead to altered sleep by disrupting the processes involved in the sleep-wake cycle.

Limited evidence supports that taking magnesium supplements enhances sleep. However, some studies suggest magnesium supplementation may improve sleep duration, insomnia, and daytime sleepiness.

Learn more about magnesium.

B vitamins

Studies show mixed results for the impact of B vitamins on sleep. Some older research indicates increased vitamin B12 could link to a shorter time asleep, while other research finds no link between higher levels of vitamin B12 and sleep health.

Some research indicates that deficiencies in vitamin B12 may contribute to depression, which is commonly associated with sleep disturbances. Furthermore, vitamin B6 deficiencies may promote psychological distress, resulting in sleep problems.

Supplementing vitamin B6 may improve sleep quality and duration. A 2019 study also found that taking a supplement of magnesium, melatonin, and vitamin B complex for 3 months improved sleep and helped treat insomnia.

Read more about B vitamins.

Some people may find that natural or herbal remedies help them to sleep. There is little scientific evidence that home remedies work, but some small studies and accounts from individuals state the following have improved their sleep quality:

  • Melatonin: The brain produces melatonin in response to darkness. It helps with the body’s internal 24-hour clock and with sleep. Melatonin supplements may reduce the time it takes for people to fall asleep and increase their sleep time.
  • Valerian root: This is an herb available as a dietary supplement. Although study results are inconsistent, valerian root may promote sleep and prevent sleep disorders.
  • Chamomile: People commonly use chamomile as an herbal tea. One study indicates that chamomile may improve sleep quality.
  • Lavender: Inhaling lavender oil before bedtime may enhance sleep quality. However, there needs to be more high quality research to reach definite conclusions about its effectiveness.
  • Passionflower: This is a climbing vine available as a dietary supplement. Passionflower may improve total sleep time and efficiency, according to a 2020 study.

Read more about home remedies for sleep.

Over-the-counter (OTC) medications, such as diphenhydramine (Benadryl) and doxylamine succinate (Unisom), may aid sleep. These are both sedating antihistamines.

Unisom may contain either doxylamine succinate or diphenhydramine as its active ingredient for aiding sleep.

A doctor may prescribe sleeping pills to help with some sleep problems. Medications may include:

According to an older source, zaleplon and zolpidem tend to have hypnotic effects by reducing the time it takes to fall asleep and improving sleep quality.

Doctors typically recommend only taking sleeping medication for a few weeks, but some medications are safe for long-term use.

Implementing some sleep hygiene strategies into the daily routine can help a person sleep better, such as:

  • waking up and going to sleep at the same time every day
  • managing worries by speaking with a trusted person
  • avoiding caffeine, alcohol, and nicotine, if applicable, before bed
  • getting regular daily exercise, but not too close to bedtime
  • ensuring the sleep environment is cool, dark, and quiet

If making changes to sleep hygiene does not improve sleep, a person should contact a doctor to ensure they do not have a medical condition.

Read our tips for sleeping better.

A few studies and personal accounts indicate that certain vitamins and minerals may improve sleep quality, including:

  • vitamin D
  • vitamin C
  • magnesium
  • B vitamins

However, researchers need to conduct more studies to confirm their findings.

Some evidence also suggests natural and herbal remedies may promote sleep, including melatonin, lavender, and chamomile.

OTC and prescription medications are available to aid sleep and treat sleep disorders. People can also try changing their sleep routines to get a better night’s sleep.