Your next healthy habit starts here. Explore the Collection

Caffeine and Sleep: How to Time Your Last Cup

Where caffeine hides, how it can affect your sleep, and a simple two-week experiment to find your own cut-off time.

A morning coffee or a mid-afternoon cup of tea is part of the daily rhythm for many of us. Caffeine can help you feel more alert, but that same effect can make it harder to wind down at night. If you’ve been sleeping poorly, the timing of your last caffeinated drink is one of the easiest things to look at.

How caffeine affects sleep

Caffeine is a stimulant. Its effects can last for several hours after your drink, so a coffee in the late afternoon may still be working at bedtime. Depending on the person, caffeine later in the day can make it harder to fall asleep, or make sleep lighter and more easily disturbed, even if you don’t notice it.

Everyone reacts differently. Some people can drink an espresso after dinner and sleep well; others find that a cup of tea at lunchtime keeps them awake.

Where caffeine hides

Coffee is the obvious source, but caffeine is also found in:

  • Black and green tea
  • Cola and some other soft drinks
  • Energy drinks, which can contain a lot of it
  • Chocolate, especially dark chocolate
  • Some cold and flu remedies and painkillers (check the label)

Recommended from the Twily library

  • TwilySleep Better in 21 DaysCreate healthier nights and more energized mornings. Coming soon
    PDF eBook 28 pages

    Sleep Better in 21 Days

    Create healthier nights and more energized mornings.

    • 21-day sleep routine
    • Sleep diary
    • Bedtime checklist

Find your own caffeine cut-off

Many people sleep better when they keep caffeine to the morning and early afternoon. A simple two-week experiment can show you what works for you:

  1. For one week, note the time of your last caffeinated drink and how well you slept.
  2. The next week, move your last caffeinated drink to earlier in the day, for example before 2pm.
  3. Compare your notes. Did you fall asleep more easily or wake up feeling more rested?

Easy swaps for the afternoon and evening

  • Decaf coffee or decaf tea
  • Herbal or fruit teas, such as chamomile, peppermint or rooibos
  • Warm milk or a milk alternative
  • Water with a slice of lemon, cucumber or a few berries

If you usually drink a lot of caffeine, cut down gradually rather than all at once. Stopping suddenly can leave some people with headaches or tiredness for a few days.

Part of a wider routine

Caffeine timing works best alongside other sleep-friendly habits, like regular bedtimes and a calm, dark bedroom. Read Understanding Sleep Hygiene and How to Create a Bedroom That Helps You Rest for more ideas.

If you are pregnant, there are specific guidelines on caffeine, so ask your midwife or doctor. If you regularly struggle to sleep, please speak to your doctor.

Further reading

A gentle note: this article shares general wellness information for education only. It is not medical advice. Please speak with a qualified healthcare professional about your individual health needs. Read our health disclaimer.

More guides from the Twily library