Sleep and mood move together in both directions. Poor sleep lowers mood and raises anxiety; low mood and anxiety wreck sleep. When both are off, the sleep side is usually the faster one to fix.
Why sleep hits mood so hard

Sleep runs in cycles, and the deep stages early in the night do the emotional reset work. One short night makes neutral faces look threatening on a brain scan. Three short nights can produce depressive symptoms in someone with no history of them. That is the system behaving predictably under sleep debt.
The clinical rule of thumb: insomnia that lasts over three months and happens at least three nights a week is worth treating in its own right, whatever else is going on with mood.
The boring basics

A fixed wake time. Same time every day, weekends included. Wake time anchors the body clock more strongly than bedtime does. Bedtime can flex by half an hour; wake time shouldn’t.
Morning light. Ten to thirty minutes outside within an hour of waking, no sunglasses. Bright light in the morning pushes melatonin earlier, which pulls sleepiness earlier.
Caffeine timing. Caffeine’s half-life runs around five hours. A 4 p.m. coffee leaves half its dose circulating at 9 p.m. Cutting off caffeine by early afternoon is the single change with the best effort-to-payoff ratio.
Alcohol honesty. Alcohol sedates, and sedation fragments the second half of the night and suppresses REM. A drink to fall asleep borrows against 3 a.m.
A wind-down that’s boring on purpose. Lights down an hour before bed. Something quiet and low-stimulus. Screens work better with the brightness down and the content dull.
Naps and lie-ins. A short nap before mid-afternoon is fine. Long or late naps steal pressure from the night, and a weekend lie-in drifts the body clock later, which makes Sunday night harder. If a lie-in is non-negotiable, keep it under an hour.
When you’re lying awake

The standard advice from CBT-I (cognitive behavioral therapy for insomnia) is counterintuitive: get up. If you’re awake and frustrated for what feels like twenty minutes, leave the bed and do something quiet in low light until sleepiness returns, then go back. The goal is rebuilding the association between bed and sleep, since lying there frustrated teaches the opposite.
No clock-watching. Turn the clock away from the bed. Checking the time starts the arithmetic (“if I fall asleep now I’ll get four hours”), and the arithmetic keeps you awake.
Picture the common spiral: someone checks the clock at 2 a.m., runs the arithmetic, and feels a small surge of panic about tomorrow. The panic is the part that keeps them awake. Moving to the sofa with a dull book ends the arithmetic, and sleepiness usually returns within the half hour.
Give any change two weeks before judging it. The body clock adjusts slowly, and sleep often gets briefly worse before it gets better. A simple sleep diary (in-bed time, wake time, one rating of the night) turns a fuzzy complaint into a pattern a doctor or therapist can read. Tired weeks are exactly when memory goes unreliable.
When to seek care
See a doctor when insomnia lasts more than a month, when sleepiness interferes with driving or work, or when there are loud snoring pauses in breathing (a screening sign for sleep apnea, which has effective treatment). Loud snoring plus witnessed breathing pauses plus daytime sleepiness is the classic triad.
Sleeping pills have a role for short stretches, such as grief or jet lag, and most guidelines discourage long-term use. CBT-I works as well as medication for chronic insomnia, and its effects last longer. A GP or sleep clinic can point to a program.
Shift workers need their own plan, since a fixed wake time isn’t always available. A sleep clinic can build a schedule around rotating shifts instead of against them. Questions worth bringing to a GP: could any current medication be affecting sleep, should thyroid or iron levels be checked, and is a sleep study warranted.
And one boundary worth stating plainly: if low mood comes with early morning waking, weight change, or thoughts of death, that combination needs professional care soon, independent of whatever the sleep diary says.