Vitamin D and sleep: everything you need to know

Dec 22, 2023

Key takeaways

  • Vitamin D is a fat-soluble vitamin which helps support bone strength, cardiovascular health, mood and mental wellbeing. 

  • Maintaining adequate levels of vitamin D may improve sleep quality and duration by regulating your body’s natural biological clock. 

  • Few foods contain vitamin D so it can be challenging to get sufficient amounts from diet alone, but it’s also produced when your skin is exposed to sunlight.

  • You may want to consider taking a vitamin D supplement if you don’t have regular access to sunlight.

  • There isn't a clinically proven best time to take vitamin D for sleep, but it may be beneficial to take it with a meal or snack which contains fat for optimal absorption. 

This multi-purpose vitamin helps make bones strong, decreases inflammation, supports immune function and improves mental health. 

Although current research is not conclusive, vitamin D is also associated with processes that enhance the amount of quality of sleep. 

What is Vitamin D?

Vitamin D is a fat-soluble vitamin, also referred to as calciferol. There are two main forms of vitamin D: vitamin D2 (ergocalciferol) and vitamin D3 (cholecalciferol). Vitamin D2 is synthesised by plants, while vitamin D3 is synthesised in your skin in response to sunlight. Vitamin D3 is also found in some animal-based food sources (1). 

Food sources containing Vitamin D 

It can be challenging to get sufficient amounts of vitamin D from diet alone because few foods naturally contain it. Liver oil and fatty fish are the best known sources of vitamin D3, with smaller amounts found in dairy and egg yolks (2, 23). Some mushrooms contain some vitamin D2, especially if they were intentionally exposed to ultraviolet light during the growing process. Milk, orange juice, and breakfast cereals are sometimes fortified with vitamin D, where it has been added in by the manufacturer. 

Vitamin D supplementation may be recommended if you’re not able to obtain enough vitamin D from sunlight and diet. Testing your vitamin D levels can be helpful in order to reveal whether you are deficient or not. Vitamin D supplements are available in both D2 and D3 forms. However D3 is often considered more effective at raising and maintaining blood levels of vitamin D (3). 

Health benefits of vitamin D 

Vitamin D is involved in numerous physiological processes in your body. Maintaining adequate levels is essential for your overall health and well-being including:

Bone health: Vitamin D is essential for the absorption of calcium and phosphorus, minerals needed for maintaining strong and healthy bones. A deficiency can lead to a bone deformity condition called rickets in children, and osteoporosis, or decreased bone mineral density, in adults (3).

Immune system support: Vitamin D regulates the immune system, enhancing your body's natural defence system against infections and diseases (3).

Muscle function: Vitamin D is involved in muscle function. Being deficient in this vitamin has been linked to muscle weakness, cramps and pain (3).

Cardiovascular health: Some studies suggest that sufficient vitamin D levels may be associated with a lower risk of cardiovascular diseases by regulating blood pressure and reducing inflammation (3).

Mood and mental health: Recent research associated a link between vitamin D deficiency and mood disorders, such as depression (4). Research has shown inconsistent findings on the effectiveness of vitamin D supplementation in significantly alleviating symptoms of Seasonal Affective Disorder (SAD). However, some suggest improvements in related symptoms, including mood and fatigue (24).

Cancer prevention: Some research suggested a potential role for vitamin D in reducing the risk of certain types of cancer, however more research is needed to establish a clear connection (3).

Anti-inflammatory effects: Vitamin D has anti-inflammatory properties, which may help support overall health and decrease the risk of developing a number of chronic diseases (3).

Vitamin D deficiency 

Roughly one billion people around the world are deficient in vitamin D, and at least 50 percent have vitamin D insufficiency, or lower than ideal levels (5). Vitamin D deficiency may result from inadequate amounts of sun exposure, not obtaining enough vitamin D foods in the diet, or poor absorption of the vitamin generally.

Inadequate sun exposure

Vitamin D3 is produced as a result of a chemical reaction in the skin when the sun’s ultraviolet (UVB) light breaks down 7-dehydrocholesterol, a precursor to vitamin D and cholesterol. Vitamin D deficiency, in relation to sun exposure, may happen as a result of:

  • Spending little time outdoors due to working in an office most days or avoiding intensely sunny weather.

  • Using sunscreen all the time blocks the absorption of UVB sunlight. To prevent sunburn, aim to expose your forearms or a similarly sized area of bare skin to the sun for about 10-30 minutes a day, depending how sensitive your skin is.

  • Having darker skin may impact vitamin D deficiency (6). People with darker skin may produce less vitamin D when exposed to sunlight compared to those with lighter skin. 

  • Older age leads to a decrease in 7-dehydrocholesterol levels, the precursor of vitamin D. 

  • Northern latitudes above 37 degrees north or below 37 degrees south of the equator are at a relatively higher risk of developing vitamin D deficiency, where the sunlight is weaker. People living in these regions typically don’t make enough vitamin D from the sunlight for four to six months out of the year (7, 25). 

Dietary factors

Some foods are rich in vitamin D, such as fatty fish, fortified dairy products and egg yolk. A vitamin D deficiency may occur if we don’t eat these foods on a regular basis, particularly if you’re following a vegan diet or have an intolerance to dairy.


Some medical conditions, like celiac disease, Crohn's disease, or taking certain medications can affect the absorption of vitamin D in the intestines. 


Vitamin D is fat-soluble and accumulates in excess fat tissue. If we have unhealthy levels of body fat, vitamin D may not be as readily available for use when your body needs it (3). 

Vitamin D and sleep: the surprising connection

Lack of sleep or poor quality sleep can lead to a number of serious health issues such as heart disease, poor immune system function, obesity and impaired cognitive function (8). Most healthy adults require at least seven hours a night, however at least 30 percent of us suffer from a sleep disorder, such as insomnia (9). 

Exciting research is being conducted on the relationship between vitamin D and sleep. Although we do not have randomised controlled trials (RCTs) demonstrating that vitamin D supplementation directly improves sleep patterns, it’s possible that vitamin D could play a role in both quality and quantity of sleep.

Vitamin D and circadian rhythm 

Vitamin D may play a role in regulating the circadian rhythm, your body's internal clock that influences sleep-wake cycles. This innate time keeper is orchestrated by the suprachiasmatic nuclei (SCN), located on the bottom of the hypothalamus. Disruption to the circadian rhythm can impact your sleep patterns (10). 

Exposure to light can help regulate your circadian rhythm. A study of 500 students in Seattle, Washington, found that those who didn’t get enough sunlight during the winter months, stayed up later and slept in later. Researchers found that every additional hour of daytime light exposure was linked with better regulation of circadian rhythm and improved sleep (12). 

If you can’t get outside then try to sit close to a window. One study suggested that workers in windowless environments had a lower sleep quality than those who were seated near a window (13). 

Bright light therapy is a treatment method that involves exposure to a bright light that mimics natural sunlight. These have also been shown to be effective for regulating circadian rhythm and improving mood for people who struggle with depressive symptoms due to lack of exposure to natural daylight (11).

Vitamin D and melatonin 

Melatonin is a hormone that your brain produces when exposed to darkness. It regulates your circadian rhythm. Exposure to light at different times of the day can influence this as well (14, 15). For example when using electronic devices such as a phone right before bed, it can trick your brain into thinking it's daytime and cause difficulty falling asleep. 

Research suggests that vitamin D may influence the production of melatonin (16). Vitamin D may also be involved in the synthesis of serotonin, a neurotransmitter, or chemical messenger, that contributes to feelings of well-being and happiness. Serotonin is a precursor to melatonin, which is crucial for sleep (17). People with SAD have difficulty regulating serotonin and melatonin, so balancing both may help improve issues with poor sleep (24). 

Vitamin D and inflammation 

Adequate levels of vitamin D are associated with anti-inflammatory effects, reducing the production of pro-inflammatory cytokines, or signalling proteins which control inflammation in your body. Increased levels of certain cytokines, such as interleukin-1 (IL-1) and tumour necrosis factor-alpha (TNF-α), are associated with sleep disturbances and interruptions in sleep patterns (22). 

Can vitamin D help you sleep better?

Some people who struggle with insomnia have  seen benefits to their sleep quality after increased daytime exposure to light. In one small study,16 elderly participants suffering from insomnia, were treated with timed exposure to bright white light or dim red light for 12 days. The group exposed to the bright light had between a 77.5 to 90 percent improvement in sleep efficiency, reduced waking time and increased sleep quality (18). 

What time should I take vitamin D for sleep?

There isn't a universally agreed-upon best time to take vitamin D for improved sleep. Some medical experts suggest taking it in the morning because it's naturally produced by the body during daylight hours. The most important factor is consistency, so choose a time that works best for you and try to stick to it.

Because vitamin D is a fat-soluble vitamin, it is better absorbed when taken with foods that contain healthy fats, such as olive oil, avocado, nuts or seeds (1). One study shows that taking vitamin D with a high fat meal upped blood levels by 32 percent compared to a fat-free meal up to 12 hours after eating (19).

For some people, taking supplements on an empty stomach may cause mild stomach upset. If you experience any discomfort, you could try taking it with a small amount of food. Each person responds to supplements differently, so it's always a good idea to consult your physician before supplementing your diet.

Will taking vitamin D before bed disturb sleep quality?

Some small studies suggest that if you take a vitamin D supplement before bed, it may disturb sleep quality. One study conducted on people with multiple sclerosis found that higher levels of vitamin D may be linked to lower levels of melatonin (20). Melatonin levels in the body should naturally increase about two hours before going to bed. So taking vitamin D may potentially interfere with sleep.

If you notice that taking vitamin D in the evening makes it difficult to fall asleep or stay asleep, try taking it earlier in the day. 


  1. Dixon, Katie M, and Rebecca S Mason. 2009. “Vitamin D.” The International Journal of Biochemistry & Cell Biology 41 (5): 982–85.

  2. Maurya, Vaibhav Kumar, and Manjeet Aggarwal. 2017. “Factors Influencing the Absorption of Vitamin D in GIT: An Overview.” Journal of Food Science and Technology 54 (12): 3753–65.

  3. Shieh, Albert, Rene F. Chun, Christina Ma, Sten Witzel, Briana Meyer, Brandon Rafison, Leon Swinkels, et al. 2016. “Effects of High-Dose Vitamin D2 versus D3 on Total and Free 25-Hydroxyvitamin D and Markers of Calcium Balance.” The Journal of Clinical Endocrinology & Metabolism 101 (8): 3070–78.

  4. Guzek, Dominika, Aleksandra Kołota, Katarzyna Lachowicz, Dominika Skolmowska, Małgorzata Stachoń, and Dominika Głąbska. 2021. “Association between Vitamin D Supplementation and Mental Health in Healthy Adults: A Systematic Review.” Journal of Clinical Medicine 10 (21): 5156.

  5. Sizar, Omeed, Swapnil Khare, Amandeep Goyal, Pankaj Bansal, and Amy Givler. 2020. “Vitamin D Deficiency.” PubMed. Treasure Island (FL): StatPearls Publishing. 2020.

  6. Libon, F., E. Cavalier, and A.F. Nikkels. 2013. “Skin Color Is Relevant to Vitamin D Synthesis.” Dermatology 227 (3): 250–54.

  7. Harvard School of Public Health. 2019. “Vitamin D.” The Nutrition Source. July 2, 2019.

  8. National Heart, Lung, and Blood Institute. 2022. “Sleep Deprivation and Deficiency - What Are Sleep Deprivation and Deficiency? | NHLBI, NIH.” March 24, 2022.

  9. Ferrie, J. E., M. Kumari, P. Salo, A. Singh-Manoux, and M. Kivimaki. 2011. “Sleep Epidemiology--a Rapidly Growing Field.” International Journal of Epidemiology 40 (6): 1431–37.

  10. Abboud, Myriam. 2022. “Vitamin D Supplementation and Sleep: A Systematic Review and Meta-Analysis of Intervention Studies.” Nutrients 14 (5): 1076.

  11. Blume, Christine, Corrado Garbazza, and Manuel Spitschan. 2019. “Effects of Light on Human Circadian Rhythms, Sleep and Mood.” Somnologie : Schlafforschung Und Schlafmedizin = Somnology : Sleep Research and Sleep Medicine 23 (3): 147–56.

  12. Dunster, Gideon P., Isabelle Hua, Alex Grahe, Jason G. Fleischer, Satchidananda Panda, Kenneth P. Wright, Céline Vetter, Jennifer H. Doherty, and Horacio O. de la Iglesia. 2022. “Daytime Light Exposure Is a Strong Predictor of Seasonal Variation in Sleep and Circadian Timing of University Students.” Journal of Pineal Research 74 (2).

  13. Boubekri, Mohamed, Ivy N. Cheung, Kathryn J. Reid, Chia-Hui Wang, and Phyllis C. Zee. 2014. “Impact of Windows and Daylight Exposure on Overall Health and Sleep Quality of Office Workers: A Case-Control Pilot Study.” Journal of Clinical Sleep Medicine 10 (6).

  14. National Center for Complementary and Integrative Health. 2022. “Melatonin: What You Need to Know.” National Center for Complementary and Integrative Health. July 2022.

  15. “National Institute of General Medical Sciences.” n.d. National Institute of General Medical Sciences (NIGMS). Accessed November 28, 2023.

  16. Minich, Deanna M., Melanie Henning, Catherine Darley, Mona Fahoum, Corey B. Schuler, and James Frame. 2022. “Is Melatonin the ‘next Vitamin D’?: A Review of Emerging Science, Clinical Uses, Safety, and Dietary Supplements.” Nutrients 14 (19): 3934.

  17. Portas, C. M., B. Bjorvatn, and R. Ursin. 2000. “Serotonin and the Sleep/Wake Cycle: Special Emphasis on Microdialysis Studies.” Progress in Neurobiology 60 (1): 13–35.

  18. Campbell, S S, D Dawson, and M W Anderson. 1993. “Alleviation of Sleep Maintenance Insomnia with Timed Exposure to Bright Light.” Journal of the American Geriatrics Society 41 (8): 829–36.

  19. Dawson-Hughes, Bess, Susan S Harris, Alice H Lichtenstein, Gregory Dolnikowski, Nancy J Palermo, and Helen Rasmussen. 2015. “Dietary Fat Increases Vitamin D-3 Absorption.” Journal of the Academy of Nutrition and Dietetics 115 (2): 225–30.

  20. Han, Bin, Fu-Xiang Zhu, Chao Shi, Heng-Lan Wu, and Xiao-Hong Gu. 2017. “Association between Serum Vitamin D Levels and Sleep Disturbance in Hemodialysis Patients.” Nutrients 9 (2): 139.

  21. Eyles, Darryl W., Steven Smith, Robert Kinobe, Martin Hewison, and John J. McGrath. 2005. “Distribution of the Vitamin D Receptor and 1α-Hydroxylase in Human Brain.” Journal of Chemical Neuroanatomy 29 (1): 21–30.

  22. Yan, Shoumeng, Zhenwei Tian, Hantong Zhao, Changcong Wang, Yingan Pan, Nan Yao, Yinpei Guo, Han Wang, Bo Li, and Weiwei Cui. 2020. “A Meta‐Analysis: Does Vitamin D Play a Promising Role in Sleep Disorders?” Food Science & Nutrition 8 (10): 5696–5709.

  23. Schmid, Alexandra, and Barbara Walther. 2013. “Natural Vitamin D Content in Animal Products.” Advances in Nutrition 4 (4): 453–62.

  24. Penckofer, Sue, Joanne Kouba, Mary Byrn, and Carol Estwing Ferrans. 2010. “Vitamin D and Depression: Where Is All the Sunshine?” Issues in Mental Health Nursing 31 (6): 385–93.

  25. Publishing, Harvard Health. 2008. “Time for More Vitamin D.” Harvard Health. September 1, 2008.

  26. Melrose, Sherri. 2015. “Seasonal Affective Disorder: An Overview of Assessment and Treatment Approaches.” Depression Research and Treatment 2015: 1–6.