Poor sleep: causes, biomarkers and how to improve your sleep quality

Poor sleep is one of the most common health complaints in the UK, and one of the most consequential. Sleep problems blood test requests are rarely part of a standard GP consultation, yet research consistently shows that several measurable biological imbalances directly disrupt the mechanisms that drive and regulate sleep. Insomnia, difficulty staying asleep, waking unrefreshed, and chronic poor sleep quality all have multiple contributing causes, including physiological ones that a blood panel can identify. Understanding what is driving your sleep problems specifically requires looking at the biomarkers most commonly involved, and this is where targeted testing provides a meaningful starting point alongside sleep hygiene and behavioural approaches.


What causes poor sleep from a biological perspective?

Thyroid dysfunction

The thyroid gland is a master regulator of the body's metabolic rate, and both overactive and underactive thyroid function disrupt sleep through different mechanisms. An overactive thyroid (hyperthyroidism) produces a hypermetabolic state characterised by restlessness, racing heart, heat intolerance, and difficulty switching off at night, producing insomnia with a distinctly wired quality. An underactive thyroid (hypothyroidism) slows metabolism and can produce sleep apnoea, disrupted sleep architecture, and non-restorative sleep that leaves people tired despite what appears to be adequate time in bed. A systematic review found a bidirectional relationship between hypothyroidism and insomnia, with symptomatic overlap, metabolic comorbidities, and hormonal dysregulation linking the two conditions.

TSH secretion follows a circadian rhythm, peaking in the early hours of the morning. Disrupted sleep itself alters this rhythm and can produce TSH changes that further affect thyroid function. Testing the full thyroid panel, including TSH, Free T3, and thyroid antibodies, provides a more complete picture than TSH alone, particularly for people whose sleep deterioration coincides with other thyroid-related symptoms.

Magnesium deficiency

Magnesium is often called the relaxation mineral for its role in regulating GABA, the neurotransmitter that calms neural activity and facilitates sleep onset. Low magnesium reduces the brain's ability to downregulate the nervous system at bedtime. A double-blind, placebo-controlled clinical trial found that magnesium supplementation in adults with insomnia produced statistically significant improvements in sleep time, sleep efficiency, early morning awakening, and objectively measured melatonin levels and cortisol concentrations. Research consistently shows that low magnesium levels are associated with suboptimal sleep quality, though the exact mechanism by which magnesium influences sleep architecture continues to be studied.

Magnesium is depleted by chronic stress, high caffeine intake, alcohol, and poor diet quality. Modern dietary patterns frequently provide insufficient magnesium, making suboptimal magnesium status common without producing the obvious symptoms of severe deficiency.

Cortisol dysregulation

Cortisol follows a natural diurnal rhythm: it peaks shortly after waking, supporting energy and alertness, and declines through the day, reaching its lowest point around midnight as melatonin rises. When cortisol remains elevated in the evening, either from chronic stress, irregular sleep timing, or lifestyle factors such as evening exercise, blue light exposure, or late caffeine, sleep onset is delayed and sleep architecture is disrupted. Waking between 2 and 4 am with difficulty returning to sleep is a pattern frequently associated with elevated nocturnal cortisol. Short sleep duration has also been associated with increased morning cortisol levels, creating a bidirectional relationship where poor sleep elevates cortisol and elevated cortisol perpetuates poor sleep.

Iron deficiency and ferritin

Low ferritin is closely associated with restless leg syndrome (RLS), a neurological condition characterised by an irresistible urge to move the legs that worsens in the evening and during rest. RLS is one of the most common causes of difficulty falling asleep and staying asleep. Studies show that optimising ferritin levels significantly reduces RLS symptoms in people with low iron stores. More broadly, low ferritin is associated with suboptimal cognitive and neurological function, and the fatigue and physiological arousal it produces can interfere with sleep quality independent of RLS. Women with heavy periods and those following plant-based diets are at particular risk.

Vitamin D deficiency

Vitamin D influences serotonin and melatonin production, both of which are relevant to sleep quality and the sleep-wake cycle. Research published in the journal ScienceDirect identified that vitamin D plays a role in regulating both serotonin and melatonin through the serotonergic pathway, suggesting that improving vitamin D status may be beneficial for mood and sleep in people with deficiency. Low vitamin D is also associated with increased systemic inflammation, which independently disrupts sleep architecture. In the UK, where vitamin D synthesis from sunlight is unavailable for approximately six months of the year, deficiency is extremely common, particularly among people with limited outdoor exposure.

Blood sugar instability

Blood sugar that drops significantly during the night triggers a cortisol and adrenaline response to raise it, which activates the same wake-promoting circuitry as the stress response. This produces the common pattern of waking suddenly at 2 to 4 am, feeling alert or anxious, and being unable to return to sleep. People with insulin resistance, reactive hypoglycaemia, or who eat high-carbohydrate, low-protein evening meals are most susceptible. Checking HbA1c and fasting glucose provides useful context for whether metabolic instability is contributing to sleep disruption.

Systemic inflammation and CRP

Elevated systemic inflammation is associated with disrupted sleep architecture and non-restorative sleep. The relationship is bidirectional: poor sleep elevates inflammatory markers, and elevated inflammation disrupts sleep, creating a cycle that both worsens sleep quality over time and increases chronic disease risk. CRP and homocysteine both reflect inflammatory burden in a way that is measurable and responsive to lifestyle intervention.


How to test for biological contributors to poor sleep

Blood tests cannot diagnose insomnia or sleep disorders such as sleep apnoea, which require clinical assessment and in some cases a formal sleep study. What they identify is whether biological imbalances are contributing to poor sleep that might be addressable through targeted interventions.

A comprehensive blood panel for investigating biological contributors to sleep problems covers:

TSH, Free T4, and Free T3 provide a complete thyroid picture. Both hyper- and hypothyroid states disrupt sleep through distinct mechanisms; TSH alone frequently misses the relevant patterns.

Ferritin identifies low iron stores associated with restless leg syndrome and sleep-disrupting physiological symptoms. A blood count does not assess ferritin directly; it needs to be specifically included.

Vitamin D reflects both seasonal and chronic deficiency patterns that affect melatonin and serotonin pathways relevant to sleep.

HbA1c and fasting glucose assess whether blood sugar instability is driving nocturnal waking.

CRP and homocysteine identify systemic inflammation, which is both a cause and a consequence of poor sleep quality.

Vitamin B12 and folate support the methylation processes involved in melatonin synthesis and neurological function.

If poor sleep is accompanied by snoring, observed pauses in breathing, or excessive daytime sleepiness that persists despite adequate time in bed, sleep apnoea is a possibility that requires a clinical sleep study for diagnosis. Home blood testing identifies nutritional and hormonal contributors but cannot diagnose structural sleep disorders.


Evidence-based biological strategies for sleep

Optimise magnesium and key nutrients

Magnesium is the most targeted nutritional intervention for sleep quality with a direct biological mechanism. Dietary sources include dark leafy vegetables (spinach, Swiss chard), nuts, seeds, legumes, and whole grains. Many adults fall below the recommended intake through diet alone. Magnesium glycinate and magnesium malate are the forms most commonly used for sleep rather than gut symptoms; taking them two hours before bed aligns with the research showing benefit. Addressing ferritin through iron-rich foods (lean red meat, lentils, fortified cereals) and vitamin D through supplementation in autumn and winter directly addresses two of the most common and addressable biological contributors to sleep disruption.

Support the cortisol-melatonin handover

The transition from cortisol dominance during the day to melatonin dominance at night is a timed biological process that requires the right conditions. Dimming lights in the two hours before bed, avoiding bright screens and overhead lighting, and keeping evening meals to a moderate size and lower glycaemic index all support this transition. Regular morning outdoor light exposure, ideally within 30 to 60 minutes of waking, sets the circadian clock and improves the reliability of the evening melatonin rise. Consistent sleep and wake times, even at weekends, are among the most evidence-supported sleep interventions available and directly support the cortisol circadian rhythm.

Stabilise blood sugar before bed

For people who wake at 2 to 4 am with alertness and difficulty returning to sleep, blood sugar management is worth prioritising. Avoiding high-carbohydrate snacks as the last food of the day, including a moderate protein component in the evening meal, and tracking HbA1c over time tell you whether the overall metabolic pattern is stable or variable. If blood sugar patterns are consistently disrupted, addressing the underlying driver through dietary change is more sustainable than sleep aids.

Reduce systemic inflammation

An anti-inflammatory dietary pattern, regular moderate exercise, alcohol reduction, and addressing any underlying gut dysbiosis all lower the systemic inflammatory burden that disrupts sleep architecture. Oily fish, leafy vegetables, olive oil, and legumes provide the anti-inflammatory nutrients (omega-3, polyphenols, fibre) most relevant to lowering CRP. Tracking CRP before and after a dietary intervention period tells you whether the change is having its intended biological effect.


Stride tests that can help with Poor sleep


Biomarkers

Biomarker What it measures Why it matters Relevance
TSH Blood Test (Thyroid Stimulating Hormone) Pituitary signal for thyroid hormone Both hypo- and hyperthyroidism disrupt sleep through distinct mechanisms; TSH follows a circadian rhythm itself 5
Ferritin Blood Test Iron storage levels Low ferritin is closely associated with restless leg syndrome; addressing deficiency significantly reduces RLS severity 5
Vitamin D Blood Test (25-OH) 25-OH vitamin D status Influences melatonin and serotonin pathways; deficiency associated with poorer sleep quality and duration 5
FT3 Blood Test (Free Triiodothyronine) Active thyroid hormone The marker most closely linked to metabolic rate effects on sleep; missed by TSH-only testing 4
HbA1c Blood Test (Glycated Haemoglobin) Long-term blood sugar control Blood sugar instability drives nocturnal cortisol and adrenaline release, causing the classic 2-4 am waking pattern 4
hsCRP Blood Test (High Sensitivity C-Reactive Protein) Systemic inflammation Elevated inflammation is both a cause and consequence of poor sleep; breaking this cycle requires addressing both 4
FT4 (Free Thyroxine) Blood Test Thyroid storage hormone Needed alongside Free T3 to assess whether thyroid conversion is a factor in sleep disruption 3
Active B12 Blood Test (Holotranscobalamin) Active B12 status Supports methylation for melatonin synthesis; deficiency associated with disrupted sleep-wake cycle and vivid dreams 3
TPO Antibodies (Thyroid Peroxidase Antibodies) Blood Test Autoimmune thyroid activity Hashimoto's thyroiditis can disrupt sleep even when TSH appears within range, via inflammatory and hormonal mechanisms 2

FAQs

What blood tests should I consider if I have poor sleep?

The most informative starting point for a biological investigation of poor sleep includes a full thyroid panel (TSH, Free T4, Free T3), ferritin, vitamin D, HbA1c, and CRP. These cover the most common biological contributors: thyroid dysfunction (both over and underactive), low iron stores (closely linked to restless leg syndrome), vitamin D deficiency (relevant to melatonin pathways), blood sugar instability (a common driver of nocturnal waking), and systemic inflammation (which disrupts sleep architecture). A standard GP blood count and TSH test leaves most of these markers untested.

Can thyroid problems cause insomnia or poor sleep?

Yes, and through different mechanisms depending on whether the thyroid is overactive or underactive. Hyperthyroidism produces a wired, hypermetabolic state: racing heart, restlessness, heat intolerance, and difficulty switching off at night are characteristic. Hypothyroidism can produce sleep apnoea, non-restorative sleep, and daytime fatigue that persists despite adequate time in bed. A systematic review confirmed a bidirectional relationship between hypothyroidism and insomnia, with hormonal dysregulation linking the two conditions. Testing the full thyroid panel, including Free T3, is important because TSH alone frequently misses the relevant patterns.

What is the link between magnesium and sleep?

Magnesium regulates GABA, the main inhibitory neurotransmitter in the brain that facilitates the calming of neural activity required for sleep onset. When magnesium is low, the nervous system's ability to downregulate at bedtime is reduced. A clinical trial found that magnesium supplementation in adults with insomnia significantly improved sleep time, sleep efficiency, early morning awakening, and measurable melatonin and cortisol levels. Modern dietary patterns are commonly insufficient in magnesium, and the mineral is further depleted by chronic stress, caffeine, and alcohol. Good food sources include dark leafy vegetables, nuts, seeds, legumes, and whole grains.

Can low vitamin D cause sleep problems?

Research has found associations between low vitamin D and poorer sleep quality, shorter sleep duration, and increased daytime sleepiness. The proposed mechanisms involve vitamin D's role in regulating serotonin and melatonin, both of which are critical to the sleep-wake cycle. Vitamin D also has anti-inflammatory effects, and the elevated inflammation associated with deficiency independently disrupts sleep architecture. In the UK, where sunlight synthesis is insufficient for approximately six months of the year, deficiency is extremely common, and supplementation during autumn and winter is widely recommended.

Can low iron levels cause sleep problems?

Yes, particularly through restless leg syndrome. RLS is characterised by an irresistible urge to move the legs that worsens in the evening and when at rest, making sleep onset extremely difficult. Low ferritin (the iron storage marker) is closely associated with RLS severity, and addressing iron deficiency frequently reduces RLS symptoms. Separately, low ferritin produces physiological effects including heart palpitations and increased heart rate that can disrupt sleep quality. Women with heavy periods and those following plant-based diets are most at risk of low ferritin. Checking ferritin specifically, rather than relying on a blood count, is the most sensitive approach.

Why do I wake up at 3 am and cannot get back to sleep?

Waking between 2 and 4 am with alertness and difficulty returning to sleep is often associated with blood sugar dropping to a low point, triggering a cortisol and adrenaline release that activates wake-promoting brain circuits. This is particularly common in people who eat high-carbohydrate or low-protein evening meals, or who have insulin resistance. Elevated evening cortisol from chronic stress can produce a similar pattern by keeping the stress response partially activated through the night. HbA1c and fasting glucose assess the metabolic pattern; tracking sleep timing alongside dietary choices can help identify whether blood sugar is the driver.

Does poor sleep cause nutrient deficiencies?

The relationship between sleep and nutrient status is bidirectional. Sustained poor sleep can deplete magnesium through increased cortisol output and altered renal excretion. It can also disrupt appetite regulation, making poor dietary choices more likely over time. Low vitamin D impairs sleep, and disrupted sleep can impair the metabolic conversion of vitamin D to its active form. Breaking the cycle requires addressing both sides: optimising nutrient status through diet and supplementation, while implementing consistent sleep practices that support the circadian rhythm and cortisol-melatonin handover.

Can gut health affect sleep quality?

Emerging research suggests a meaningful gut-sleep connection. The gut microbiome produces serotonin, the precursor to melatonin, meaning that microbiome diversity and composition directly influence melatonin availability for sleep regulation. Gut dysbiosis is associated with elevated systemic inflammation, which disrupts sleep architecture. Some research has also found that short-chain fatty acids produced by beneficial gut bacteria have calming effects on the nervous system relevant to sleep quality. Dietary patterns that support microbiome diversity, including a wide variety of plant foods, fermented foods, and adequate fibre, may therefore support sleep as well as gut health.

Is poor sleep a medical condition I should see a GP about?

Persistent poor sleep, particularly if it has lasted more than three months, significantly affects daily function, or is accompanied by snoring, observed pauses in breathing, or excessive daytime sleepiness, warrants a GP consultation. A GP can assess for sleep apnoea (which requires a sleep study for diagnosis), rule out other medical causes, and discuss treatment options. Home blood testing identifies biological contributors such as thyroid dysfunction, low ferritin, and vitamin D deficiency, and works best as a parallel investigation alongside, or preceding, a GP consultation. It cannot replace a clinical sleep assessment for suspected structural sleep disorders.