How vitamin D helps you sleep like a king

Almost every sleep issue you might have is influenced by vitamin D.

Restless leg syndrome, sleep apnea, non-specific muscle pains, insomnia, etc. If you think of it, vitamin D is most likely involved.

I had a bunch of sleep “problems” when my vitamin D was low, which all disappeared when I started getting a lot of sunlight. They included restless leg syndrome, occasional sleep apnea, shallow sleep, long sleep onset and bad dreams.

Now I fall asleep quite easily without restless legs, sleep throughout the night, have good dreams and wake up before my alarm clock.

Amazing what a little bit of sunlight-induced steroid synthesis can do.

Vitamin D receptors are expressed in high amounts in the brain areas that are involved in sleep, such as the anterior and posterior hypothalamus, substantia nigra, midbrain central grey matter, raphe nuclei, nucleus reticularis pontisoralis and caudalis.

This 2012 study shows that maintaining a vitamin D level between 60-80 ng/ml led to significant improvements in neurologic symptoms and sleep (R).

Restless leg syndrome

I didn’t even realize that my RLS was gone until I found out that vitamin D is inversely correlated with RLS. When I read that, I was like: “Oh wow, I haven’t had RLS for a couple of months now.”

According to this study, 75.6% of the patients with RLS had low D. The odds ratio (OR) of the development of RLS was 4.24 for those with a vitamin D level < 50 nmol/L (20ng/ml) compared to those with a vitamin D level ≥ 50 nmol/L (R).

This means that those with a vitamin D level of below 20ng/ml had 424% higher risk of having RLS compared to those with higher vitamin D. That’s a huge percentage.

And it’s not just the risk factor, but also the severity factor.

Low vitamin D increases the risk and severity of RLS (R).

Supplementing vitamin D can greatly reduce RLS symptoms and even get rid of it completely. In this study, people with a vitamin D level below 20ng/ml were treated with vitamin D3 supplements (high oral dose or intramuscular injection), which increased their vitamin D from 21.7 nmol/l to 61.8 nmol/l on average. The median RLS severity score improved significantly from 26 (15-35) at baseline to 10 (0-27) after correction of the vitamin D levels (R).

Sign my jittery legs up!

There are obvious responders and non-responders. Non-responders are usually those that don’t get their D levels high enough, due to a low-fat diet, inflammation, obesity, etc. But most people (85.5%) with pain and restless legs do respond (R).

People on statin also seem to get muscle pains and they usually have a vitamin D level below 30ng/ml. Giving them vitamin D helps to get rid of the pain (R).

Last but not least, people with RLS tend to have low iron specifically in the brain. This study found that vitamin D is involved in absorbing iron into the brain, which is one of the mechanisms it helps with RLS (R).

Fatigue during the day

Any kind of inflammation and DNA damage promotes fatigue, by activating the PARP enzymes. Normally during the day, we get accumulative DNA damage and at night, we get tired so that the body can repair it. If there is a lot of DNA damage happening during the day, it will contribute to chronic fatigue.

One of the biggest sources of toxins is the gut. Poor digestion and slow transit time allow for more oxidative stress to occur in the gut as well as cause leaky gut.

 Vitamin D deficiency reduces intestinal calcium absorption leading to gut stasis and subsequently increasing gut permeability. The latter allows gut microbiota to transfer more endotoxins such as lipopolysaccharides (LPS) into the blood. LPS stimulates the production of inflammatory cytokines within the CNS, especially the pineal gland (where melatonin is produced) (R).

If you’re constipated or have a very slow transit time, you might benefit from vitamin D and calcium.

Furthermore, epidemiologists have seen an increased prevalence of multiple sclerosis in countries at high latitudes, where the sunlight is limited and where the populations have vitamin D deficiency and high melatonin levels. Vitamin D and melatonin are inversely correlated. Low D means high melatonin during the day, which can make you feel tired. Vitamin D supplementation has been shown to lower excess melatonin as well.

In this case report study, the patient had hypersomnia (excessive sleepiness during the day) and a vitamin D level of 5.9 ng/mL which is very low. Vitamin D supplementation was initiated at a dose of 50,000 IU once weekly, and symptoms improved within 2 weeks. At a later follow-up, the patient reported resolution of thigh pain, headaches and hypersomnia, with a significant improvement in low back pain. Vitamin D level was normal at 39 ng/mL at this point (R).

The authors theorize that the improvement could include enhanced sleep quality due to resolution of hypovitaminosis D-associated noninflammatory myopathy, or a possible immunomodulatory effect of vitamin D decreasing central nervous system (CNS) homeostatic sleep pressure via its effects on tumor necrosis factor-alpha (TNF-α) and/or prostaglandin D2. 

Sleep quality

Sleep quality is influenced by many things, like frequent urination, shallow sleep, long sleep onset, restless legs, etc. Solving those things will improve overall sleep quality.

Vitamin D improves sleep quality, but this study found that after about 2 years, the benefits went away and the poor sleep and joint pains returned.

However, adding B100 or B50 (B complex with either 100 – 50mg or B-vits respectively) got rid of IBS and arthritic symptoms and restored proper sleep in just 3 months! The author hypothesized that vitamin D promotes proper sleep and regeneration, which then used up B5 specifically, which then caused these symptoms. Adding the B complex helped restore proper microbiome balance (R). I discussed this study in this podcast (just look at the timestamps to go to the right section)

Young Saeng Jung et al., [25] also found a significant association between serum vitamin D deficiency and poor sleep quality in a cross-sectional study conducted between January 2015 and December
2015 on a group of workers in the manufacturing industry who worked indoors (R).

More D results in better sleep quality.

Sleep duration

Low vitamin D can lead to both short and long sleep, but most people struggle with short sleep (R). This could be because they take forever to fall asleep and then also stay asleep.

I know this all too well. 12 AM rolls around and you don’t feel tired yet. 2 AM and you feel guilty for still being up and then force yourself to go to bed. But I didn’t have short sleep. I still slept like 10-11 hours without really feeling rested.

Interestingly, this study found that vitamin D status alone did not show a relationship with sleep duration, although other factors including sun exposure correlated with sleep duration.

There was a statistical difference in 25(OH)D according to sleep duration, only in low sun exposure group. Subjects with low sun exposure and excessive sleep duration comparatively lower 25(OH)D than those with normal-range sleep, even after adjustment for potentially confounding factors. Individuals with limited exposure to sunlight should maintain adequate vitamin D status to have an appropriate sleep duration for health.” (R)

Just upping your D will not necessarily fix your sleep. It’s sunlight that’s really important.

Bad dreams

Who doesn’t want good dreams?

I frequently had weird, chaotic and negative energy dreams when my D was low. Have you ever had that feeling that you didn’t want to go to bed because you didn’t want to put up with those chaotic dreams?

Since upping my D, my dreams are good energy and not chaotic anymore

This study found that participants with normal dreams had higher vitamin D (P<0.01) and calcium intake (P<0.001) and lower anxiety and depression scores (Ps<0.001) compared to participants with bad dreams and nightmares (R). Anxiety, depression and musculoskeletal pain were predictors for bad dreams and nightmares.

Urination during the night (Nocturia)

Vitamin D insufficiency and deficiency are highly prevalent among adult men in the US, and vitamin D deficiency is associated with moderate-severe UI and the presence of at least 1 LUTS.

These preliminary results support an association between vitamin D and incident UI in community-dwelling older adults. (R)

Sleeping through the night

I don’t know about you, but I almost never slept through the night. I woke up at least once due to hot flushes and hypoglycemia and a few other times due to small bladder syndrome.

All of that went away as I fix my metabolism and I got additional benefits when I upped my D.

Adequate levels of vitamin D are necessary for the maintenance of sleep and reducing the number of nocturnal awakenings (R).

Vitamin D does this by:

  • Modulating neuronal excitability by acting on spontaneous regular firing, action potential duration, intrinsic excitability, and sensitivity to neurotransmitters as well as to neurotransmitter receptors such as the GABA receptor and the N-methyl-D-aspartate (NMDA) receptor (R).
  • Upregulating the synthesis of neurotrophins such as neural growth factor (NGF), neurotrophin 3 (NT3), and glial cell line-derived neurotrophic factor (GDNF), and downregulating neurotrophin 4 (NT4).
  • Lowering proinflammatory mediators, such as interleukin-1(IL-1), tumour necrosis factor-alpha (TNF-α) and prostaglandin D2 (PGD2) (R).

Teeth grinding

Sleep bruxism is associated with vitamin D deficiency and low consumption of calcium and was also associated with increased scores of anxiety and depression (R). 

Sufficient vitamin D and calcium concentrations are required for regulating both the nervous system and muscular function including jaw muscle contraction. Low vitamin D levels may dysregulate calcium homeostasis in the brain, which may influence neuron excitability and lead to increased risk of psychiatric problems such as dementia, schizophrenia, anxiety, and depression.

Sleep apnea

Persistent inadequacy of vitamin D may also increase the risk for obstructive sleep apnea via the promotion of adenotonsillar hypertrophy, airway muscle myopathy, and/or chronic rhinitis (R, R, R).

Vitamin D is also needed to calm the immune system, reduce inflammation and control the nasal microbiome. When my D was low, I had a lot of food sensitivities and my nose would be easily congested. Eliminating those problematic foods got rid of my congested nose, but I still had those food sensitivities.

Upping my D got rid of most of my food sensitivities and my nose stays open even if I eat something I used to be sensitive to in the past.

Join the Alpha Energy Male newsletter

The highest 5 star rated (>100) testosterone optimization newletter on the internet.

Lastest reviews


Rated 5 out of 5
September 13, 2023

If you have a considered interest in increasing your testosterone levels then I would recommend this newsletter. I’ve been into increasing my testosterone for quite some time, and I still learned new information in the lead magnet.


Nice newsletter

Rated 5 out of 5
September 13, 2023

Good read



Melatonin rises at night and can help to improve sleep quality. However, with chronic inflammation and gut issues, melatonin is reduced which can contribute to sleep issues.

Melatonin, apart from being synthesized in the pineal gland at night, is also produced in other extra-pineal sites such as the retina, the gastrointestinal tract, skin, bone marrow, and lymphocytes, where it can act as an intracellular mediator or paracrine signal, in addition to having endocrine effects. In particular, it is found in vast amounts in intestinal cells (R).

Intestinal microbiota directly or indirectly participates in the production of this hormone. On the one hand, microbial metabolism produces melatonin directly, and, on the other hand, gut bacteria indirectly produce short-chain fatty acids (SCFAs) that stimulate the production of serotonin, which is then converted into melatonin through the actions of arylalkylamine-N-acetyltransferase (AANAT) and acetylserotonin O-methyltransferase (ASMT), through the melatonergic pathway (R).

People with low vitamin D are at a higher risk of gut issues, such as (silent) colitis, IBS and IBD. Gut dysbiosis is almost always found in people with gut issues, which involves low butyrate production and an increase in endotoxins, such as lipopolysaccharides.

Low vitamin D also leads to reduced calcium absorption. “The reduction in intestinal calcium absorption leads to disruptions in intestinal motility and subsequently causes stasis of aboral movement (gut stasis) and gastroparesis in the long term (78). Gut stasis is a potentially deadly condition in which the digestive system slows down or stops completely whereas gastroparesis is a chronic disorder of delayed gastric emptying characterized by food remaining in the stomach for a longer time than normal (79).” (R)

Slow transit time will allow the transfer of lipopolysaccharide (LPS), a component of the outer membrane of gram-negative bacteria, to the general circulation causing chronic inflammation.

Optimizing gut health is the new longevity hack:

Enhanced absorption of endotoxin leads to an increase in nitric oxide stress and oxidative stress, a strong autoimmune pro-inflammatory response, and the production of tryptophan catabolites, thus affecting tryptophan metabolism and melatonin production (R).

Gut dysbiosis leads to:

  • Reduction in butyrate production
  • Increase in endotoxins
  • Oxidative stress and inflammation
  • Leaky gut
  • Amino acid malabsorption. Less tryptophan is absorbed and then bacteria use the tryptophan to create toxin indole poducts.

The inflammation activates the kynurenine pathway which uses tryptophan to produce a host of compounds, including neurotoxin metabolites, such as quinolinic acid.

All in all, this leads to less tryptophan available for melatonin synthesis.

Melatonin itself has a host of benefits, some of which includes:

  • Decreasing the expression of the estrogen receptor alpha (ERα) (R)
  • decreasing the affinity of the ERα for estradiol (R).
  • preventing the binding of the estradiol -> ERα -> Calmodulin (E2-ERα-CaM) complex to DNA and therefore preventing ERα transcription (R).
  • Inhibiting the aromatase (R). Melatonin has been shown to modulate not only aromatase, but also other enzymes involved in the local synthesis of estrogens, reducing the expression and activity of sulfatase and 17β-hydroxysteroid dehydrogenase (17βHSD) enzymes, which are involved in the formation of biologically active estrogens from inactive steroids such as androgens and estrogens. In addition, this pineal hormone increases the expression and activity of estrogen sulfotransferase (EST), increasing the number of inactive sulfoconjugated estrogens (R).
  • Converting premature adipocytes to mature adipocytes that don’t express the aromatase (R).
  • Melatonin has been shown to restore gut microbiota composition. Specifically, it reduces the relative abundance of Clostridiales, and increases that of Lactobacillus, which is correlated with a reduction in the permeability of the intestinal barrier (R)
  • These effects of melatonin are mediated by an increase in the circadian gene Bmal1, which leads to the inhibition of pyruvate dehydrogenase kinase, which leads to the disinhibition of pyruvate in acetyl CoA, thus increasing oxidative phosphorylation (OXPHOS) and ATP of the tricarboxylic acid cycle (TCA), with acetyl CoA also being a necessary cosubstrate for arylalkylamine-N-acetyltransferase (AANAT), and therefore the mitochondrial melatonergic pathway, which allows melatonin to optimize mitochondrial function (R).
  • Limiting the adsorption of linoleic acid, a fatty acid that promotes tumour growth (R).
  • Reducing the hepatotoxicity induced by the aromatase inhibitor letrozole. Therefore, melatonin can both improve the efficacy of conventional antiestrogens while ameliorating or eliminating their unwanted side effects (R).

And upping your D is only half the battle. Getting lots of sunlight is the other half. Irving and colleagues showed that UVB therapy in EAE (experimental autoimmune encephalomyelitis) caused an increase in the levels of skin cis-urocanic acid levels, an intermediate in the catabolism of l-histidine. Moreover, they also observed that enhancement of skin cis-urocanic acid levels independent of UVB cannot affect the disease onset or progression (R). cis-urocanic acid is important because it has been shown to cause a reduction in the severity of colitis, a chronic inflammatory condition of the gut (R, R).

Practical takeaway

Get loads of sunlight if you want to sleep better.

Preferably 10-20min first thing upon waking. If you wake up before the sun, then get a blue light device that shines roughly directly (10 or 2 o clock) into your eyes first thing after waking.

Try to get full body sunlight for at least 10 min daily for optimal vitamin D levels.

As a bonus, get my (free) sleep guide on: 10 things to improve your sleep you might never have heard of.

Download your free PDF

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: