Sleep & Nutrition — The Bidirectional Relationship

Specific nutrient deficiencies impair sleep quality. And poor sleep drives the appetite patterns that lead to further deficiency. Breaking this cycle through nutrition is one of the most underutilised interventions for sleep improvement.

Why this matters: Most sleep advice focuses on screens and schedules. But the nutritional foundation of sleep is rarely discussed — despite strong evidence that magnesium, iron, Vitamin D, tryptophan, and B vitamins all directly affect sleep architecture.

How nutrient deficiencies impair sleep

🦖
Magnesium — the most clinically significant sleep-nutrition link

Magnesium activates GABA receptors (the brain’s primary inhibitory neurotransmitter), regulates the hypothalamic-pituitary axis, and modulates melatonin synthesis. Deficiency increases cortisol at night, reduces sleep efficiency, increases arousal frequency, and worsens restless leg syndrome.

Studies in deficient individuals show magnesium supplementation (300–400mg glycinate or malate before bed) significantly improves sleep onset, duration, and quality within 4–6 weeks. Magnesium is deficient in approximately 31% of Australian adults.

Budget sources: pumpkin seeds (156mg per 30g), spinach (78mg per 100g cooked), lentils (71mg per 100g cooked), dark chocolate, almonds.

🏡
Tryptophan and protein — the melatonin precursor

Tryptophan is the dietary precursor to serotonin, which is then converted to melatonin in the pineal gland. Inadequate protein intake — particularly in the evening — reduces tryptophan availability and impairs melatonin synthesis. Low-protein diets are associated with lighter, less restorative sleep.

Tryptophan-rich foods: turkey, chicken, eggs, milk (the traditional warm milk before bed delivers both tryptophan and calcium), cheese, pumpkin seeds, oats.

☀️
Vitamin D — sleep duration and architecture

Vitamin D receptors exist throughout the brainstem sleep centres. Deficiency is associated with shorter sleep duration, higher rates of sleep disorders, and increased daytime sleepiness. Blood Vitamin D levels below 20 nmol/L are strongly correlated with poor sleep architecture.

21% of Australian adults are deficient. The fix is largely free: 15–30 min daily sun exposure on arms and legs in reasonable UV conditions. In winter in southern Australia, a supplement of 1,000–2,000 IU/day is reasonable. See the Nutrient Gaps guide for the UV mushroom hack.

🥚
Calcium — melatonin production partner

Calcium works synergistically with tryptophan for melatonin production. Calcium deficiency is associated with difficulty falling asleep and fragmented sleep. The traditional warm milk before bed is not a myth — it delivers both tryptophan and calcium simultaneously, supporting melatonin synthesis.

🥊
Iron — the primary cause of restless leg syndrome

Iron deficiency is the primary nutritional cause of restless leg syndrome (RLS), affecting an estimated 15% of the population. RLS causes irresistible urges to move the legs at night, dramatically fragmenting sleep. Crucially, standard blood tests may show normal haemoglobin while ferritin is low.

Key insight: Ferritin above 75 µg/L significantly reduces RLS symptoms in most sufferers. Standard GP testing often only checks haemoglobin — ask specifically for serum ferritin if you experience 2–4am wake-ups with leg discomfort.

🌹
B vitamins (B6, B12, folate) — the conversion pathway

B vitamins are required for the conversion of tryptophan to serotonin and then melatonin. B12 deficiency is associated with disrupted circadian rhythms and vivid, disturbing dreams. B6 deficiency impairs serotonin synthesis directly. Folate deficiency affects overall methylation, including neurotransmitter production.

How poor sleep drives poor nutrition

The relationship is strongly bidirectional. After just one night of poor sleep (under 6 hours):

Blood sugar and sleep architecture

Blood sugar instability is one of the least-discussed causes of poor sleep. When blood glucose drops significantly during the night (reactive hypoglycaemia), the adrenal glands release cortisol and adrenaline to raise it — waking you at 2–4am with a racing heart and mind.

Dietary drivers of nocturnal blood sugar instability: high-glycaemic dinners, alcohol (disrupts glucose regulation for 4–6 hours after drinking), excess refined sugar and processed carbohydrates, and inadequate protein and fat at the evening meal.
Fix: Ensure the evening meal includes adequate protein (25–35g), moderate healthy fat, and a significant vegetable component. Reduce refined carbohydrate load at dinner. A small protein-rich snack (Greek yoghurt, cheese, or a boiled egg) an hour before bed can prevent nocturnal hypoglycaemia in susceptible individuals.

Practical nutritional sleep protocol

🌑
Evening meal
Include 30g+ protein, significant vegetables, moderate complex carbohydrates. Avoid high-sugar desserts. Finish eating 2–3 hours before bed. A dinner of chicken or fish with roasted vegetables and brown rice or lentils is close to ideal.
☀️
Daily magnesium, calcium and Vitamin D
Pumpkin seeds, dark leafy greens, dark chocolate and legumes for magnesium. Dairy or sardines for calcium. Sun exposure daily for Vitamin D — or supplement in winter at 1,000–2,000 IU/day. These three nutrients work together on sleep architecture.
🥊
Address iron deficiency if you wake at 2–4am
Ask your GP to test serum ferritin (not just haemoglobin). Target ferritin above 75 µg/L. Iron-rich foods: liver, red meat, lentils, beans, spinach — always with Vitamin C. See the Nutrient Gaps guide for the full iron strategy.
🦖
Consider magnesium glycinate before bed
300–400mg magnesium glycinate or malate 1 hour before bed is one of the safest and most evidence-backed sleep supplements available. This is one of very few supplements with robust trial data for sleep improvement. Glycinate form is gentler on the gut than magnesium oxide.
Caffeine cutoff
Caffeine has a half-life of 5–7 hours. Coffee at 2pm means half the caffeine is still circulating at 9pm. Cut off at noon for most people, 10am for caffeine-sensitive individuals. Decaf after midday is not a myth — it genuinely improves sleep onset latency.

For the full nutrition framework, see 5 Daily Habits and Deficiency Symptoms. For magnesium-rich meal ideas, see Nutrient Gaps.

Sources: Abbasi B, et al. “The effect of magnesium supplementation on primary insomnia.” J Res Med Sci. 2012 · Spiegel K, et al. “Sleep curtailment in healthy young men is associated with decreased leptin levels.” Ann Intern Med. 2004 · Van Cauter E, et al. “Impact of sleep and sleep loss on neuroendocrine and metabolic function.” Horm Res. 2007 · Earley CJ, et al. “Abnormalities in CSF concentrations of ferritin and transferrin in restless legs syndrome.” Neurology. 2000 · Gominak SC. “Vitamin D deficiency changes the intestinal microbiome reducing B vitamin production.” Med Hypotheses. 2016