How Caffeine Affects Sleep | Mattress365 -

How Caffeine Affects Sleep — And How Late Is Too Late for Coffee?

By Kiran Shukle  |  11th September 2026
Comfortable bedroom designed to help with seasonal allergies

Coffee can be the difference between feeling ready to face the day and reaching for another alarm button. But that afternoon cup can sometimes come back to haunt you when bedtime arrives. If you regularly struggle to fall asleep, wake during the night or simply don't feel refreshed in the morning, your caffeine habits could be worth looking at.

Caffeine is a stimulant that can increase alertness and reduce feelings of tiredness. The effects can last for several hours, which means caffeine consumed in the afternoon or evening may still be active when you are trying to sleep.

That doesn't necessarily mean you need to give up coffee. For many people, the more useful question is when to stop drinking it.

The simple answer: There is no universal cut-off time for caffeine because people process it differently. However, if sleep is a priority, avoiding caffeine for several hours before bedtime is a sensible starting point.

How does caffeine affect sleep?

Caffeine works primarily by blocking the action of adenosine, a chemical involved in promoting sleepiness. As adenosine builds up throughout the day, you gradually feel more tired. Caffeine can temporarily reduce that feeling of sleep pressure, helping you feel more awake.

This is useful when you need to concentrate at work, drive or get through an afternoon slump. The problem is that caffeine doesn't simply disappear when you no longer feel its stimulating effects.

Depending on the person and the amount consumed, caffeine can remain in the body for hours. You may therefore feel ready for bed while still having enough caffeine in your system to affect your sleep.

How late is too late for coffee?

There isn't one magic time that applies to everyone. A person who drinks coffee regularly may respond differently from someone who rarely consumes caffeine. Genetics, metabolism, the amount consumed and individual sensitivity can all influence how long caffeine affects you.

A practical starting point is to avoid caffeinated drinks for at least six hours before bedtime. If you normally go to bed at 10:30pm, that would mean making your final caffeinated drink around 4:30pm or earlier.

If you are particularly sensitive to caffeine or already experiencing sleep difficulties, you may find that an earlier cut-off works better.

Your last coffee doesn't have to be at lunchtime. But if your sleep is suffering, moving your caffeine cut-off earlier is worth testing.

What counts as caffeine?

Coffee is the obvious source, but it isn't the only one. If you're trying to work out why you're struggling to sleep, look beyond your morning cup.

  • Coffee and espresso-based drinks
  • Tea, including some green and black teas
  • Energy drinks
  • Cola and some other soft drinks
  • Pre-workout and some sports supplements
  • Chocolate and cocoa products
  • Some medicines and other products containing caffeine

The caffeine content can vary significantly between products and serving sizes. If you're particularly sensitive, checking labels can help you understand how much you're consuming throughout the day.

Why can afternoon coffee affect your night?

One of the most misleading things about caffeine is that you don't necessarily feel stimulated when you go to bed. You might feel calm and tired but still have caffeine circulating in your system.

Research has found that caffeine consumed even several hours before bedtime can reduce sleep duration and alter sleep quality. The effect can be particularly noticeable when a large amount of caffeine is consumed.

This is why your 3pm coffee may be worth investigating if you consistently struggle to sleep at 10pm or 11pm.

Signs caffeine could be affecting your sleep

Caffeine isn't necessarily the cause of poor sleep, but certain patterns may make it worth testing.

  • You feel tired but don't become sleepy at bedtime.
  • You regularly take a long time to fall asleep.
  • You wake during the night and struggle to settle again.
  • You rely on increasingly large amounts of caffeine during the day.
  • You feel noticeably more tired after nights when you have late coffee or energy drinks.
  • You sleep better on days when you stop caffeine earlier.

Keeping a simple sleep diary for a week or two can help you spot patterns between caffeine timing and your sleep.

How much caffeine is too much?

The amount of caffeine that feels comfortable varies from person to person. Some people can drink coffee in the evening without noticing much difference, while others find that a single afternoon drink affects their night.

For healthy adults, food and health authorities generally recognise that moderate caffeine intake can fit within a normal diet. However, the amount that is suitable for you personally may be lower than a general population guideline, particularly if you are sensitive to caffeine or already have problems with sleep.

Timing matters as well as total daily intake. Several smaller caffeinated drinks spread throughout the day can still leave caffeine in your system late in the evening.

What about decaf coffee?

Decaffeinated coffee can be a useful alternative if you enjoy the ritual of an afternoon or evening coffee but want to reduce your caffeine intake.

Decaf doesn't necessarily mean completely caffeine-free. Small amounts can remain, although they are generally much lower than in standard coffee.

If you're highly sensitive to caffeine, check the product information and see how you respond rather than assuming every decaffeinated drink contains none.

How to cut down without giving up coffee

If you're drinking several caffeinated drinks throughout the day, suddenly stopping can be unpleasant. Some people experience headaches, tiredness or irritability when they significantly reduce their caffeine intake.

A gradual reduction may be easier. Start by moving your final caffeinated drink earlier, then consider reducing the number of caffeinated drinks you have during the day.

Try changing the habit rather than the ritual

If your afternoon coffee is part of your routine, replace it with something else that still gives you a short break. Try decaf coffee, herbal tea, water or simply a few minutes away from your desk.

This can make reducing caffeine feel less like losing a daily habit and more like changing what you drink during that habit.

Caffeine isn't the only thing affecting your sleep

If moving your coffee cut-off doesn't improve your sleep, don't assume you've failed. Sleep is influenced by a combination of factors, including your routine, stress levels, light exposure, bedroom environment and physical comfort.

Your mattress can also play a role in how comfortable you feel throughout the night. If you're regularly waking because you're too hot, uncomfortable or struggling to find a supportive position, caffeine may only be one part of the picture.

Our Sleep & Mattress Help and Advice offers practical guidance on improving your sleep environment, while our Cooling Mattress Buying Guide can help if overheating is one of the things disturbing your sleep.

A simple caffeine and sleep experiment

If you're unsure whether caffeine is affecting you, try a simple experiment rather than guessing.

  1. Keep your usual morning coffee.
  2. Choose a caffeine cut-off time in the early afternoon.
  3. Keep the cut-off consistent for at least several days.
  4. Record roughly when you went to bed and how long you think it took to fall asleep.
  5. Note any night-time awakenings and how refreshed you feel the next morning.

If your sleep improves, you may have found that your previous caffeine timing was too late for your individual sensitivity. If nothing changes, look at other aspects of your sleep routine and environment.

A good place to start: Keep caffeine to the morning and early afternoon for a week. You don't need to make every other part of your routine perfect at the same time. See what difference the change makes to your sleep before adjusting anything else.

Caffeine and your bedtime routine

Cutting off caffeine earlier works best when it forms part of a wider evening routine. As bedtime approaches, dim the lights, reduce stimulating activities and give yourself time to transition away from work and screens.

A comfortable mattress and suitable bedding can also help create a consistent sleep environment. For more practical advice, see our Mattress Care Guide.

If you're currently trying to change your sleep schedule as well as your caffeine habits, our guide to better sleep and bedroom comfort is a useful place to explore further.

You don't necessarily need to quit coffee to sleep better.
Sometimes, simply moving your last caffeinated drink earlier in the day can make a meaningful difference.

Frequently Asked Questions

How many hours before bed should I stop drinking coffee?

A practical starting point is around six hours before bedtime, although individual sensitivity varies. If you're particularly sensitive to caffeine or experiencing sleep problems, stopping earlier may be helpful.

Can coffee at 3pm affect my sleep?

It can. Caffeine may remain in the body for several hours, so an afternoon coffee can still affect sleep later that evening, particularly in people who are sensitive to caffeine.

Does decaf coffee contain caffeine?

Usually, yes, but in much smaller amounts than regular coffee. Decaffeinated does not necessarily mean completely caffeine-free.

Can caffeine make you tired?

Caffeine primarily increases alertness and reduces the feeling of tiredness temporarily. However, relying heavily on caffeine can contribute to a cycle where you use it to compensate for insufficient or poor-quality sleep.

Should I stop drinking coffee completely if I can't sleep?

Not necessarily. Try moving your final caffeinated drink earlier in the day first and see whether your sleep changes. If sleep problems continue, consider other factors such as your sleep schedule, stress, bedroom environment and physical comfort.

What should I do if I regularly struggle with sleep?

Persistent sleep difficulties can have many causes. If problems continue, significantly affect your daytime life or cause you concern, speak with a GP or another appropriate healthcare professional.

The Bed Post
Sleep well. Wake well. Live well.