Free UK delivery on all orders · At-home saliva test · Secure checkout
Free UK delivery on all orders

Nutritional causes of poor sleep. What you eat affects how you sleep

The nutrients most closely linked to sleep quality, the dietary patterns that disrupt it, and the personal factors that mean the same foods affect different people differently.

Poor sleep is one of the most common health complaints in the UK. Most discussions focus on sleep hygiene. Screens before bed, irregular sleep schedules, caffeine timing And while these factors matter, the nutritional dimension of sleep quality is less commonly discussed and often significantly underestimated.

What you eat directly affects your ability to fall asleep, stay asleep, and wake feeling rested. Several specific nutrients are essential to sleep physiology,and deficiencies in them impair sleep quality in measurable ways. At the sametime, certain dietary patterns and eating habits create physiological conditions that make good sleep harder to achieve.

This article covers the nutrients most directly linked to sleep quality, the dietary patterns that disrupt sleep, and why the same dietary choices affect sleep differently in different people.

"Sleep quality is not just about what you do before bed. It is built throughout the day by the nutrients your body uses to regulate the systems that make sleep possible."

How nutrition shapes sleep physiology

Sleep is regulated by two primary systems: the circadian rhythm. The internal clockdriven largely by light exposure, melatonin and sleep pressure, which builds through the day as adenosine accumulates in the brain. Both systems depend on nutritional inputs.

Melatoninis synthesised from serotonin, which is in turn synthesised from tryptophan. Anamino acid obtained from food. The conversion of tryptophan to serotonin requires B6 as a cofactor. Serotonin to melatonin conversion requires further enzymatic steps involving magnesium. This means that the entire melatonin production pathway depends on adequate dietary tryptophan, B6, and magnesium.

GABA - The primary inhibitory neurotransmitter that quiets the nervous system andfacilitates sleep also requires B6 for its synthesis. Adenosine clearance fromthe brain during sleep is affected by caffeine metabolism, which is in turn influenced by CYP1A2 genetic variants.

The picture that emerges is one where sleep quality is not just a matter of behaviour. It is built on nutritional foundations.

The nutrients most directly linked to sleep quality

💊

Most documented

Magnesium

Magnesium activates the parasympathetic nervous system and is required for GABA receptor function, which quiets neural activity and facilitates the transition to sleep. Low magnesium is associated with difficulty falling asleep, lighter sleep, more frequent waking, and reduced time in deep sleep stages. Magnesium glycinate taken in the evening is one of the more evidence-supported nutritional interventions for sleep quality.

🦃

Melatonin pathway

Tryptophan and serotonin precursors

Tryptophan is an essential amino acid and the raw material for serotonin, which is then converted to melatonin. Foods rich in tryptophan include turkey, chicken, eggs, dairy, oats, nuts, and seeds. Consuming tryptophan alongside carbohydrates enhances its conversion to serotonin by reducing competing amino acids in the bloodstream.

🧬

B vitamins

Vitamin B6

B6 is required for the conversion of tryptophan to serotonin and for GABA synthesis. Low B6 is associated with increased sleep disturbance, more vivid or disturbing dreams, and difficulty entering and maintaining deep sleep. Found in chicken, fish, potatoes, bananas, and wholegrains.

☀️

Seasonal factor

Vitamin D

Vitamin D receptors are present in areas of the brain involved in sleep regulation. Low vitamin D is associated with disrupted sleep, shorter sleep duration, and reduced sleep quality. The UK's widespread vitamin D insufficiency during autumn and winter helps explain why sleep quality tends to worsen seasonally for many people.

🦵

Restless legs

Iron

Iron deficiency is strongly associated with restless legs syndrome, the uncomfortable urge to move the legs at night that fragments sleep and significantly reduces sleep quality. Iron is also required for dopamine synthesis, and disrupted dopamine function is implicated in sleep architecture. Women of reproductive age and people eating plant-based diets are most at risk.

🐟

Inflammation

Omega-3 fatty acids

DHA, the long-chain omega-3 found primarily in oily fish, is involved in the regulation of melatonin and in reducing neuroinflammation, both of which affect sleep quality. Higher omega-3 status is associated with longer sleep duration and better sleep quality. Including oily fish two to three times per week provides DHA directly.

Key nutrients for sleep and their best food sources

Magnesium Pumpkin seeds, almonds, spinach, dark chocolate, black beans
Tryptophan Turkey, chicken, eggs, dairy, oats, pumpkin seeds, tofu
Vitamin B6 Chicken, salmon, tuna, potatoes, bananas, fortified cereals
Vitamin D Oily fish, egg yolks, fortified foods, sunlight (Apr to Sep)
Iron Liver, red meat, lentils, pumpkin seeds, sardines, spinach
Omega-3 (DHA) Salmon, mackerel, sardines, herring, anchovies

Dietary sources should form the foundation, with supplementation filling confirmed gaps.

Dietary patterns and habits that disrupt sleep

Timing and genetics

Caffeine

Caffeine blocks adenosine receptors, the mechanism through which sleep pressure builds. It does not eliminate adenosine. It masks the signal. How long caffeine stays in the system varies significantly based on CYP1A2 genetic variants. Fast metabolisers clear caffeine in 3 to 5 hours. Slow metabolisers retain it for 6 to 10 hours or more. For slow metabolisers, a 3pm coffee has significant caffeine activity at midnight. This genetic difference explains why some people can drink coffee after dinner with no apparent effect on sleep while others find afternoon coffee reliably disrupts their night.

🍷

Sleep quality

Alcohol

Alcohol is a sedative that induces sleep but significantly disrupts sleep quality. It reduces REM sleep, the phase most associated with memory consolidation and mental restoration, in the first half of the night, and causes sleep fragmentation and early waking in the second half. Even moderate alcohol consumption of one to two drinks measurably reduces sleep quality.

🍽️

Timing

Late and heavy meals

Eating a large meal close to bedtime raises core body temperature and requires significant digestive work, both of which are incompatible with sleep onset. The ideal timing is to finish eating 2 to 3 hours before sleep. A small, tryptophan-rich snack in the hour before bed may actually support melatonin production rather than hinder sleep.

🍭

Diet pattern

High-sugar and highly processed diets

Diets high in refined carbohydrates and sugar are associated with poorer sleep quality and more fragmented sleep. Blood glucose fluctuations during the night, a consequence of high-sugar eating patterns, can trigger cortisol release that disturbs sleep. Processed diets are also typically low in the micronutrients most directly linked to sleep physiology, including magnesium, B6, tryptophan, and omega-3, creating compounding effects.

The gut-sleep connection

Around 90 percent of the body's serotonin is produced in the gut. The gut microbiome plays a direct role in tryptophan metabolism and serotonin availability, meaning gut health influences the raw material supply for melatonin production. A diet that supports a diverse gut microbiome, high in fibre, fermented foods, and plant variety, indirectly supports sleep through this pathway.

Why the same diet affects sleep differently in different people

The genetic variants that influence caffeine metabolism (CYP1A2), vitamin D receptor function (VDR), magnesium transport (TRPM6/TRPM7), and omega-3 conversion (FADS1/FADS2) all contribute to differences in how diet affects sleep at an individual level. Two people making the same dietary changes canhave different sleep responses. Because their bodies process the relevant nutrients differently.

Thisis why a personalised understanding of which nutritional pathways are most relevant for you specifically is more useful than generic sleep diet advice.The nutrients that most affect your sleep are not necessarily the same ones that most affect someone else's.

In the Boone app

Boone's Sleep micro nutrition score reflects how your genetic profile and real dietary intake interact across the key nutritional pathways linked to sleep, including magnesium, B vitamins, vitamin D, omega-3, and iron. It shows you where your personal nutritional picture is likely affecting your sleep, and which dietary changes are most relevant for you specifically.

What to do

Start with the most common and most correctable factors. Assess your magnesium intake. Seeds, nuts, leafy greens, and wholegrains are the primary sources, andmany people fall short. Consider your caffeine timing If you are a slow metaboliser, moving your last coffee to before noon may produce a noticeable improvement. Reduce alcohol if you are drinking regularly and sleep quality is poor.

If you eat oily fish fewer than twice a week, your DHA intake is likely insufficient. Increasing oily fish or adding an omega-3 supplement is worth trying. If your diet is low in B6-rich foods, include more chicken, fish, or potatoes.

If you are supplementing, magnesium glycinate taken in the evening is the most evidence-supported nutritional supplement for sleep quality. Vitamin D supplementation through autumn and winter addresses one of the most common and most correctable contributors to seasonal sleep deterioration.

"Poor sleep is often treated as a behavioural problem. For many people, it is at least partly a nutritional one. And addressing the nutritional dimension is frequently the change that actually makes a difference."

Related reads

•      Signs of magnesium deficiency

•      Why am I always tired? The nutritional reasons most people never consider

•      What causes brain fog?

Frequently asked questions

Magnesium is the most consistently documented. It is required for GABA function and melatonin regulation. Tryptophan from food and B6 are needed for serotonin and melatonin synthesis. Vitamin D is associated with sleep quality and widely insufficient in the UK. Iron deficiency is strongly linked to restless legs syndrome. DHA from omega-3 is associated with sleep duration and quality.

The evidence is reasonably consistent. Magnesium activates the parasympathetic nervous system, supports GABA receptor function, and plays a role in melatonin regulation. Supplementation with magnesium glycinate in the evening is one of the more evidence-supported nutritional sleep interventions, particularly for people whose dietary intake is low.

No. The CYP1A2 gene produces significant individual variation in caffeine metabolism. Fast metabolisers clear caffeine in 3 to 5 hours. Slow metabolisers retain it for 6 to 10 hours or more. Two people drinking coffee at the same time of day can have profoundly different sleep effects as a result. If caffeine timing does not seem to explain your sleep disruption, you may be a fast metaboliser, or the cause may lie elsewhere.

Yes. Alcohol is a sedative that induces sleep but disrupts sleep architecture. It reduces REM sleep in the first half of the night and causes fragmentation and early waking as it is metabolised. Even one to two drinks measurably reduces sleep quality. The sense that alcohol helps you sleep is real. The sense that it helps you sleep well is not.

Avoid large meals within 2 to 3 hours of bedtime. A small tryptophan-rich snack in the hour before bed, such as a small bowl of oats with milk or a handful of pumpkin seeds, may support melatonin production. Avoid high-sugar foods in the evening, which can cause blood glucose fluctuations during the night.

Understand the nutritional dimension of your sleep.

Boone's Sleep micro nutrition score connects your genetic profile to your real dietary intake, showing you which nutritional factors are most relevant for your sleep specifically, and which food changes are most likely to make a difference.

Download the Boone app and discover what your nutritional picture looks like.

Get started with Boone
Share this article
Genetic Testing
PersonaliSed Nutrition
Meal Analysis
Healthy Living