Sleep & Recovery guide

Caffeine and Sleep: When to Stop Before Bed

Caffeine can make it harder for some people to fall asleep or stay asleep, but responses vary. NHS insomnia guidance advises avoiding tea or coffee for at least 6 hours before bed. Treat that as a practical starting point, not a rule that suits everyone.

Sleep & Recovery · GuideLast updated: Educational only

Quick answer

Caffeine can stay active for several hours. NHS insomnia guidance advises avoiding tea or coffee for at least 6 hours before bed. Treat that as a practical starting point, not a rule: sensitivity, timing, and what you drink can vary. If you try moving caffeine earlier, keep the rest of your evening routine broadly similar and note what changes.

If your usual bedtime is 11pm, a cautious first experiment would be no tea, coffee, cola, energy drinks, or other caffeine sources after about 5pm, then adjust based on how you respond.

Caffeine is not only in coffee: tea, cola, energy drinks, chocolate, pre-workout products, and some medicines or tablets may contain it. Caffeine timing is not a way to diagnose or treat sleep or anxiety problems. If concerns are persistent, worsening, distressing, linked with anxiety, or affecting daily life, speak to a pharmacist, GP, or qualified professional. Read our medical disclaimer for the site’s information boundaries.

Who this guide is for

This guide is for adults who drink caffeine and wonder whether the timing could be making evenings harder. It is especially useful if you have coffee or strong tea after lunch, use energy drinks, take pre-workout products, or have a "just one more" caffeine habit that has crept later into the day.

It is not for managing diagnosed sleep disorders, serious daytime sleepiness, pregnancy-specific advice, medication decisions, or caffeine dependence. Those situations deserve personalised support.

Why caffeine timing matters

Caffeine is a stimulant. In plain English, it can make your brain feel more switched on. That is often the point in the morning. The awkward bit is that the useful morning effect can become an annoying evening effect if caffeine is still hanging around when you are trying to wind down.

NHS insomnia guidance lists caffeine as one of the common things that can contribute to poor sleep, alongside stress, room conditions, alcohol, nicotine, shift work, medicines, and some health conditions. That means caffeine is worth checking, but it is rarely the only possible explanation.

A simple caffeine timing experiment

Try this for 5 to 7 days before deciding whether caffeine timing is one factor for you:

  1. Choose a caffeine cut-off time. Start with mid-afternoon or about 6 hours before your usual bedtime.
  2. Keep your wake time, wind-down, meals, screens, and bedroom setup broadly similar.
  3. Note caffeine timing, bedtime, wake time, night waking, and how rested you feel.
  4. Check every source of caffeine, including drinks, chocolate, pre-workout products, and medicine labels.
  5. Avoid making several major changes at once if you want to understand whether timing is part of the picture.

If you use a lot of caffeine, do not assume an abrupt stop will suit you. Reducing gradually may feel more comfortable for some people. If nothing changes, look at the wider sleep routine, including light exposure, regular wake times, screen use, stress, and your sleep environment.

What if caffeine seems to affect anxiety as well as sleep?

Some people notice feeling more alert, wired, restless, or physically tense after caffeine. That can make winding down harder, but it does not explain every sleep or anxiety problem. Anxiety, panic, sleep problems, and mood changes can have many causes. If these symptoms are persistent, severe, worsening, or affecting daily life, speak to a GP, pharmacist, or qualified professional rather than trying to manage everything through caffeine timing alone.

Caffeine is not only in coffee

When you are checking timing, include all the sources you use rather than counting coffee alone:

  • coffee, including espresso drinks
  • black tea and green tea
  • cola and energy drinks
  • chocolate
  • pre-workout products and energy shots
  • some headache, cold, or flu medicines or tablets

Check labels before combining medicines or supplements. Our guides on how to read a medicine label and supplements and medicine interactions explain what to look for. If you are unsure whether a medicine or supplement contains caffeine or is suitable for you, ask a pharmacist. Browse the Medicine Safety guides for general context.

What timing might look like

Pattern What to try Why it may help
Morning coffee only Keep it steady and avoid adding new afternoon caffeine. A consistent routine makes it easier to see what actually affects sleep.
Afternoon slump caffeine Move the drink earlier, reduce the size, or swap to a lower-caffeine option. Late caffeine can make it harder for some people to feel sleepy at bedtime.
Evening energy drink or pre-workout Check the label and avoid using stimulant products close to bedtime. These products can contain more caffeine than people expect, sometimes alongside other stimulants.
Sleep still poor after cutting caffeine Look at stress, light, alcohol, nicotine, pain, reflux, medicines, snoring, and sleep routine. Caffeine is one lever, not the whole control panel.

When to speak to a pharmacist, GP, or healthcare professional

Get advice if sleep problems are lasting for months, affecting your daily life, causing distress, or linked with low mood, anxiety, panic symptoms, severe tiredness, shift work, medicines, pregnancy, breastfeeding, a long-term health condition, chest symptoms, palpitations, or breathing pauses during sleep.

Speak to a pharmacist or clinician before using sleep aids or supplements, especially if you take medicines, are pregnant or breastfeeding, are buying for a child, have a long-term condition, need to drive, or work with machinery.

What not to do

  • Do not treat caffeine timing as a cure for insomnia.
  • Do not stop or change prescribed medicines because of sleep problems without professional advice.
  • Do not replace proper sleep support with high-dose supplements, sedating products, or alcohol.
  • Do not suddenly cut a heavy caffeine habit if it causes severe headaches, shakiness, or other difficult symptoms. Tapering gradually may be more comfortable, and a pharmacist can help you think it through.
  • Do not ignore severe daytime sleepiness, breathing pauses, chest pain, fainting, or symptoms that feel urgent.

FAQ

How many hours before bed should I stop caffeine?

There is no single cut-off that suits everyone. NHS insomnia guidance advises avoiding tea or coffee for at least 6 hours before bed. Treat that as a practical starting point, not a universal rule.

Is six hours before bed a good caffeine cut-off?

It can be a useful place to start, but it is not a universal rule. People differ in caffeine sensitivity, timing, and what they drink. If sleep problems persist or affect daily life, ask for advice rather than assuming caffeine is the whole explanation.

Can tea affect sleep as much as coffee?

Tea can contain caffeine, and the amount varies by type, strength, and serving size. Include black tea, green tea, matcha, and coffee when checking your total timing.

What drinks or products contain hidden caffeine?

As well as coffee and tea, check cola, energy drinks, chocolate, pre-workout products, energy shots, and some headache, cold, or flu medicines. Read the label and ask a pharmacist if you are unsure.

Can caffeine make anxiety or restlessness worse at night?

Some people notice feeling more wired, restless, or physically tense after caffeine. These symptoms can have many causes, so seek professional advice if they are persistent, severe, worsening, or affecting daily life.

When should I get help for sleep problems?

Speak to a pharmacist, GP, or qualified professional if sleep problems are persistent, worsening, causing distress, or having a significant effect on daily life. Seek urgent help for symptoms that feel urgent.

Sources and further reading

Read our editorial standards for how we select and review sources.

Final takeaway

Caffeine timing is a useful sleep check because it is specific, practical, and low-cost. Start by moving caffeine away from bedtime, watch what changes, and keep the rest of the routine steady. If sleep is still difficult or affecting daily life, do not try to tough it out forever. That is the point to ask for proper support.