Trouble sleeping? Being deficient in this vitamin could be why you can’t sleep through the night

A woman sat on bed wearing white vest and orange shorts with a glass of water in hand, looking out of window with wooden frame and plants outside.
(Image credit: Getty Images)

Vitamin D might be known as the 'sunshine vitamin' but this nutrient could also play a key role in how well we sleep. According to recent studies, Vitamin D deficiency is linked to poor sleep quality and duration — and it affects roughly 35% of Americans. That's a lot of people suffering with poor sleep needlessly.

Vitamin D is produced by the body when we're exposed to sunlight, and nutritionists have long recognized a connection between this common vitamin and bone health. However recent research has found that those lacking in vitamin D are also more likely to experience reduced sleep quality and they're more likely to keep waking up at night.

So should we all be eating more fatty fish and soaking up the sun in the quest for better sleep? Here's what vitamin D deficiency means for your shut-eye...

Key takeaways of the study

  • Low levels of vitamin D are associated with poor sleep quality
  • Vitamin D deficiency might be linked to obstructive sleep apnea
  • Research is needed into how increasing vitamin D levels benefits sleep

Recent research has suggested a strong link between vitamin D and sleep, with those experiencing sleep deprivation displaying lower levels of vitamin D than those with good sleep health.

The study has found evidence that vitamin D could be linked to disrupted sleep and reduced sleep duration — meaning as well as trouble sleeping through the night, you might be getting less rest overall.

Man in bed unable to get to sleep

(Image credit: Shutterstock)

And this isn't the first time a connection between vitamin D and sleep quality has been proposed. A 2020 study described vitamin D as "playing a promising role in sleep disorders," while research from 2014 suggested a connection between vitamin D deficiency and obstructive sleep apnea.

Vitamin D — a nutrient found in fatty food and produced by the body when exposed to sunlight — promotes bone and teeth health, as well as aiding the immune system. It's estimated that roughly 35% of Americans are vitamin D deficient, with that number rising to 50% worldwide.

Does this mean a lack of fatty fish and egg yolks might be responsible for your poor sleep? While vitamin D deficiency might be impacting your sleep quality, more research is needed to determine just what kind of role it plays in your sleep wellbeing.

It's also worth noting one big source of vitamin D is the sun, and regular exposure to daytime light helps regulate our internal body clock. So lacking sunlight during the day can both impact your vitamin D levels and disrupt your circadian rhythm — and that's bad news for your sleep all round.

How to get more vitamin D

Vitamin D can be divided into two types: D2 and D3. Vitamin D2 is found in plants, while D3 — which is considered the more effective form — is found in animal sources and produced by the skin when exposed to sunlight. If you're concerned about your vitamin D levels, consider speaking to a health professional about the best way to access vitamin D. Here are some of the most common sources of vitamin D:

1. Fatty fish and enriched foods

An easy way to differentiate between types of vitamin D is to remember the source: D2 is found in plants, D3 in animals. Foods that are naturally rich in D3 include egg yolks, fish such as trout, tuna and salmon, beef liver and cheese. Mushrooms are a common source of vitamin D2.

A photo of a hard boiled egg

(Image credit: Shutterstock)

However, enriched foods are responsible for the majority of vitamin D consumption in the US. Milk and other dairy products (including dairy free milk alternatives) often contain added vitamin D.

2. Vitamin D supplements

Vitamin D supplements are available over the counter and are a common way to increase vitamin D intake. To aid with absorption, it's recommended to take vitamin D supplements alongside foods that contain vitamin D.

Be aware that some vitamin D supplements contain sugar, so you should avoid taking them before bed (eating sugar can keep you awake.) If you take any medications, speak to your doctor before using vitamin D supplements to prevent harmful interactions.

3. More sunshine

The body naturally creates vitamin D when exposed to sunlight and being outside is a key (and accessible) source of this nutrient for many people. And as an added benefit, daytime sunlight exposure helps your body clock keep ticking, meaning we can fall asleep easier at night and wake up better in the morning.

Direct sunlight is essential for vitamin D creation, so you can't just sit by a closed window (although we still recommend opening your curtains first thing in the morning.) But if you are going out in the sun, make sure to wear sufficient sunscreen.

You can also leave your daily run for the daytime to get some extra sunshine during your workout. So, if you want to do some vigorous exercising, avoid this healthy habit right before bed as it can be too stimulating and won't get you your daily dose of vitamin D.

a photo of a woman walking with a backpack and walking poles

(Image credit: Shutterstock)

Will taking vitamin D supplements help you sleep?

Some research suggests taking vitamin D supplements can have a positive effect on sleep quality, but these studies are still early and more research is needed. Vitamin D supplements won't work like a sleeping pill (you can't take one before bed and hope to get snoring) but improving your overall levels of vitamin D may help your sleep quality.

Other tips for improving sleep health

There are many things that contribute to our overall sleep quality, from the temperature of our bedroom to the time we finishing eating (three hours before bed, according to the 10-3-2-1-0 method.) Here are a few tips for getting better sleep:

  • Avoid eating close to bed time: While a vitamin D rich diet might benefit your sleep, we don't recommend eating in the hours close to your bed time. Eating late means your body is still digesting when you go to bed, potentially causing indigestion.
  • Choose the right mattress for your sleep style: Comfort is vital for good sleep quality. The best mattress for your sleep style will help you fall asleep, stay asleep and wake up well rested.
  • Dim the lights in the evening: Sunlight might be good for your vitamin D levels, but if there's too much bright light in the evening you'll struggle to fall asleep. Turn the lights down as you progress in your bedtime routine, to tell your body that it's night.
Ruth Jones
Sleep staff Writer

Ruth is a staff writer at Tom’s Guide, covering all things mattress and sleep. She has a deep interest in the link between sleep and health, and has tried enough mattresses to know the right bed really can make a difference to your wellbeing. At Tom’s Guide she writes to help people sleep better, from how-tos to the latest deals to mattress reviews, and has interviewed an array of specialists who share her passion. Before joining the team at Tom’s Guide, Ruth worked as a sleep and mattress writer for our sister website, TechRadar.

Read more
A woman lying on her back in bed in a jumper, hat and cozy blanket with an eye mask on, sleeping in winter
It's more difficult to sleep in winter — 7 expert tips for better rest
A woman asleep at desk in front of laptop and yellow mug as she's tired all the time
This could be the reason you’re tired all the time — and it’s not lack of sleep
A woman lying awake in bed looking tired as a slither of sunlight lights up her face, with a Tom's Guide Sleep Week 2025 logo in the top right corner
Expert warns 'sleepmaxxing' may actually cause sleep deprivation — plus 3 tips to tackle it for Sleep Week
A woman sat on the edge of her bed holding her stomach in pain as she experiences the symptoms of GERD
Trouble sleeping? Your melatonin supplements could be stopping you from sleeping through the night
An older woman sleeping deeply on her side with a Tom's Guide Sleep Week 2025 logo in the top right corner
Deep sleep boosts immunity, repairs muscles and helps you learn — but do you get enough?
A man laying on grey sofa sleeping next to bowl of popcorn
Trouble sleeping? Adding more of these two food groups to your diet will help you sleep faster, better and deeper
Latest in Sleep
Woman has taped her mouth shut with a blue I shaped mouth tape
I tried the viral I-shaped mouth tape to improve my sleep and I'll never wear it again — here's why
A woman in bed reading a book with a cup of tea in hand and a lamp on the bedside table, as she completes her nighttime routine
Reduce your stress before bed by 68% with this easy 6-minute nighttime routine
A man and a woman sleeping in bed
Forget the Scandi Sleep Method — 3 tricks for better sleep I recommend for bedsharing couples
Bare feet poking out of the covers at the end of a bed
Twitching in your sleep? Expert shares 5 most common causes of hypnic jerks
A woman with dark hair lies in bed yawning because she is so tired and ready to sleep
Tired all the time? Sleep experts share how to tackle hypersomnia — plus what might be causing it
A woman with long dark hair falls asleep quickly in a comfy bed dressed with soft white linens
I'm an ex-insomniac turned sleep coach — my 3 top tips to fall asleep quickly
Latest in News
A TV with the Netflix logo sits behind a hand holding a remote
Netflix is rolling out a big video quality upgrade — what you need to know
Choi Hyun-Wook, Hong Kyung, and Park Ji-hoon in "Weak Hero Class 1" now streaming on Netflix
This action-packed K-drama is now streaming on Netflix — and now’s the time to binge-watch before season 2
OnePlus 13 back, leaning against blue wall
OnePlus 13T could come with an even bigger battery than OnePlus 13 — this is incredible
Apple Watch Ultra 2
Apple Watch Ultra 3 just tipped for two major upgrades
NYTimes Connections
NYT Connections today hints and answers — Tuesday, March 25 (#653)
A nervous woman looking at her phone
Is ChatGPT making us lonely? MIT/OpenAI study reveals possible link
  • Youni
    While VitaD deficiency is pervasive, 'me thinks' the author overstates the source article. The "study" is little more than a "review" of other peoples papers. The "study" (aka review) largely sidesteps decades of scientific progress. For instance, one widely-recognized reason for low vitaD is reduced exposure to the sun. More people work indoors. Reduced bright light exposure during the daytime has a cascade of biological consequences which have been mechanistically studied in the laboratory and in populations to establish cause and effect. e.g. Indoor lighting and irregular lighting during the day tend to reduce the strength/amplitude circadian linked hormonal rhythms, that underlie sleep. Special photoreceptor neurons in the eye directly signal daytime function dozens of cortical brain regions. None of this is about VitaD.

    While VitaD is part of a bigger day-night pattern of physiological health, and correlates with an office/school anxiety-generating and circadian disturbing trend involving less sun exposure, does promoting VitaD as a "silver bullet" remedy for millions of people seem irresponsible for Toms Guide publication?
    Reply