3 peer-reviewed sources, DOI-verifiedUpdated Oct 1, 2026How we verify
Coffee is the world’s favourite stimulant, and for most people moderate amounts are fine. But if you’re prone to feeling wired, jittery or anxious — or you’re sleeping badly — caffeine is one of the easiest things to look at first.
Caffeine and anxiety
Caffeine blocks adenosine, a chemical that builds up during the day and makes you feel sleepy. A review of caffeine and mental health describes how high doses can induce anxiety, particularly in sensitive people, while moderate intake is generally well tolerated.
Reviews how caffeine can induce anxiety at high doses, particularly in sensitive people, while moderate intake is generally well tolerated.
Sensitivity varies a lot between people. If you notice a racing heart, restlessness or a spike in worry after coffee, that’s useful information about you.
How late is too late?
In a placebo-controlled study, people took 400 mg of caffeine — roughly three to four cups of brewed coffee — at bedtime, 3 hours before bed, or 6 hours before bed. All three timings significantly disrupted sleep compared with placebo, including the dose taken six hours before bed.
400 mg of caffeine taken even 6 hours before bedtime significantly disrupted sleep compared with placebo.
The authors concluded that the results support avoiding substantial caffeine for at least six hours before bedtime.
Why sleep matters for anxiety
Poor sleep and anxiety feed each other. One study found that sleep loss raised next-day anxiety, while deep slow-wave sleep had an anxiety-reducing effect. So late caffeine can affect tomorrow’s anxiety through tonight’s sleep. Read more in Sleep and anxiety.
A simple two-week experiment
- Have your last caffeine at least six to eight hours before bed.
- Count tea, cola, energy drinks, pre-workout powders and dark chocolate too.
- If you drink a lot, cut down gradually to avoid withdrawal headaches.
- Use our weekly Nervous System Check to notice any difference.
If you have a heart condition, are pregnant or take medication, ask your doctor about safe caffeine limits for you.