Back to Blog

Caffeine and Sleep: How Late Is Too Late?

9 September 202611 min readBy Keltoi Wellness
Caffeine and Sleep: How Late Is Too Late?

Caffeine and Sleep: How Late Is Too Late?

A morning coffee can help you feel more alert, but caffeine can remain active in the body for much longer than many people realise.

For some people, an afternoon coffee seems to make little difference. For others, caffeine several hours before bed can make it harder to fall asleep, reduce total sleep time or leave sleep feeling lighter and less refreshing.

So, how late is too late for caffeine?

There is no single cut off time that suits everyone, but if your sleep is poor, changing when you have your final coffee or tea can be one of the simplest things to test.

Quick Answer

A practical starting point is to avoid caffeine for at least six hours before bed.

The NHS specifically advises people with insomnia not to drink tea or coffee within six hours of going to bed. ([nhs.uk][1])

Some people may need to stop earlier. Research suggests caffeine can still affect sleep many hours after it is consumed, and individual sensitivity varies considerably. ([PubMed][2])

If you usually go to bed at 11pm, trying your last caffeinated drink by around 5pm is reasonable. If your sleep remains poor, moving your cut off towards lunchtime may be worth trying.

Why Does Caffeine Affect Sleep?

Caffeine is a stimulant.

One of the main ways it works is by interfering with the action of adenosine, a chemical involved in building up the feeling of sleepiness as the day goes on.

This can make you feel more awake and alert.

The important distinction is that caffeine does not remove your body's need for sleep. It can temporarily make that tiredness less noticeable.

That is useful when you want to concentrate in the morning.

It is less useful when your body is trying to wind down at night.

How Long Does Caffeine Stay in Your Body?

Caffeine does not disappear from the bloodstream as soon as you stop feeling its effects.

Its half life is commonly several hours.

A half life simply means the amount of time required for the body to process approximately half of the caffeine present.

So if caffeine remains in your system for several hours, an afternoon coffee can still be relevant by bedtime.

This is also why simply saying:

"Coffee doesn't keep me awake."

does not necessarily mean caffeine is having no effect at all.

You might still fall asleep reasonably quickly while experiencing changes in total sleep time or sleep quality.

When Should You Stop Drinking Coffee?

The NHS recommendation of avoiding tea or coffee for at least six hours before bed provides a useful starting point. ([nhs.uk][3])

For example:

  • Bed at 10pm: consider stopping by around 4pm
  • Bed at 11pm: consider stopping by around 5pm
  • Bed at midnight: consider stopping by around 6pm

However, these are not rigid rules.

If you continue to struggle with sleep, try moving your final caffeine intake earlier.

Some people find that keeping caffeinated drinks to the morning works better.

Can Caffeine Affect Sleep Even Eight Hours Later?

Potentially, yes.

A 2023 systematic review and meta analysis looked at 24 studies examining caffeine and sleep.

Across the studies, caffeine was associated with:

  • reduced total sleep time
  • lower sleep efficiency
  • taking longer to fall asleep
  • more time awake during the night
  • less deep sleep

The researchers estimated that a coffee containing around 107mg of caffeine would need to be consumed approximately 8.8 hours before bedtime to avoid reducing total sleep time on average. ([PubMed][2])

That does not mean everyone must follow an 8.8 hour rule.

It shows that caffeine can affect sleep for longer than people often expect.

Does Everyone React to Caffeine Differently?

Yes.

There can be considerable variation between individuals.

Some people feel jittery after one coffee.

Others can drink several cups without noticing much.

Factors that can influence the response to caffeine include:

  • genetics
  • usual caffeine intake
  • age
  • pregnancy
  • medicines
  • smoking
  • individual metabolism
  • the strength and amount consumed

Research has also found pronounced individual differences in caffeine related sleep disturbance. ([PubMed][4])

Your own sleep pattern therefore matters more than following somebody else's routine.

How Much Caffeine Is in Coffee?

The amount varies significantly depending on the size of the drink and how it is prepared.

As a general guide, NHS figures include approximately:

  • 100mg in a mug of instant coffee
  • 75mg in a mug of tea
  • 40mg in a can of cola
  • 80mg in a 250ml energy drink

Coffee shop drinks and filter coffee may contain considerably more caffeine depending on the serving. ([nhs.uk][5])

This is why saying you have "two coffees a day" does not necessarily reveal very much about your actual caffeine intake.

Does Tea Affect Sleep Too?

It can.

Black tea and green tea both normally contain caffeine.

Tea generally contains less caffeine than many coffees, but several cups throughout the afternoon and evening can still contribute a meaningful amount.

If you are testing whether caffeine affects your sleep, remember to consider more than coffee.

Caffeine can also be found in:

  • tea
  • cola
  • energy drinks
  • chocolate
  • pre workout products
  • some supplements
  • some medicines

What About Energy Drinks?

Energy drinks can contain significant amounts of caffeine.

The NHS gives approximately 80mg in a standard 250ml can, but larger servings can contain more. ([nhs.uk][5])

They can be particularly relevant for people who:

  • work late
  • study at night
  • exercise in the evening
  • work shifts
  • regularly feel tired during the day

If you repeatedly need energy drinks simply to stay awake, it may also be worth asking why you are so tired.

Persistent daytime sleepiness can sometimes reflect poor quality sleep or another health problem.

Is Decaf Better in the Evening?

If you enjoy coffee later in the day, switching to decaffeinated coffee is a simple option.

Decaf can still contain a small amount of caffeine, but generally much less than ordinary coffee.

For someone who enjoys having a warm drink after dinner, this may be easier than trying to give coffee up completely.

Caffeine free herbal drinks are another possibility, although it is still worth checking the ingredients.

Can You Fall Asleep Normally but Still Have Poorer Sleep?

Yes.

One common misconception is:

"Caffeine doesn't affect me because I can fall asleep after coffee."

Falling asleep is only one aspect of sleep.

Research suggests caffeine can also influence:

  • total time asleep
  • how often you wake
  • sleep efficiency
  • deep sleep

A systematic review found that caffeine typically prolonged the time taken to fall asleep, reduced total sleep time and reduced sleep efficiency. ([PubMed][4])

So it is possible to fall asleep and still experience some effect.

Should You Only Drink Coffee in the Morning?

You do not necessarily have to.

If you sleep well and an early afternoon coffee causes no noticeable problems, there may be no reason to remove it purely because someone online says you should.

But if your sleep is poor, moving caffeine earlier is a sensible experiment.

A simple routine could look like this:

Morning: normal coffee or tea

Early afternoon: smaller serving or decaf

Late afternoon and evening: caffeine free drinks

Try it consistently rather than for just one night.

What About Shift Workers?

The clock time matters less than when you intend to sleep.

If you work overnight and plan to sleep at 9am, then drinking a strong coffee at 7am may affect your sleep in much the same way as an evening coffee might affect somebody who sleeps at 11pm.

If caffeine helps you during a shift, consider using it earlier and reducing intake as your intended sleep period approaches.

Shift work can affect sleep for several reasons, not just caffeine, so persistent difficulties may deserve further assessment.

Can Caffeine Cause Insomnia?

Caffeine can contribute to insomnia, particularly when consumed later in the day.

However, insomnia can have many causes.

These include:

  • stress
  • anxiety
  • low mood
  • pain
  • menopause symptoms
  • shift work
  • alcohol
  • nicotine
  • medicines
  • irregular sleep routines
  • sleep apnoea
  • restless legs syndrome

So if reducing caffeine does not help, do not assume you have simply failed to find the right coffee cut off.

There may be something else contributing.

The NHS advises speaking to a GP if changes to your sleep habits have not helped or if you think you may have insomnia. ([nhs.uk][1])

Can Poor Sleep Lead to More Caffeine?

Absolutely.

It can become a cycle:

You sleep badly.

You feel tired the next day.

You drink more coffee.

You have caffeine later because you are still tired.

That caffeine potentially affects the next night's sleep.

You wake tired again.

For some people, reducing late caffeine can help interrupt this pattern.

Should You Stop Caffeine Completely?

Not necessarily.

If caffeine does not appear to cause problems and you consume sensible amounts, there is usually no need to abandon coffee altogether.

For sleep, timing may matter just as much as the total amount.

Someone having two coffees before midday may experience very different effects from someone having their second coffee at 7pm.

What If You Are Pregnant?

Pregnancy has specific caffeine guidance.

The NHS recommends consuming no more than 200mg of caffeine per day during pregnancy. ([nhs.uk][5])

Remember that this includes caffeine from all sources, including:

  • coffee
  • tea
  • energy drinks
  • cola
  • chocolate
  • some supplements

If you are pregnant and unsure about your caffeine intake, speak with your midwife, GP or pharmacist.

Can Caffeine Be Hiding Another Sleep Problem?

Sometimes.

If you are constantly using caffeine because you feel exhausted, it is worth paying attention to the tiredness itself.

Speak to your GP if you regularly experience symptoms such as:

  • excessive daytime sleepiness
  • loud snoring
  • pauses in breathing noticed during sleep
  • morning headaches
  • difficulty staying awake while driving
  • persistent insomnia
  • unexplained severe tiredness
  • uncomfortable or restless legs at night

These symptoms do not automatically mean there is a serious problem, but they may justify assessment.

What Support Is Available in Northern Ireland?

If sleep difficulties are persistent, your GP is generally a sensible first point of contact in Northern Ireland.

The Northern Ireland Formulary Good Sleep Guide recommends practical measures such as winding down during the evening, maintaining a consistent wake time and avoiding excessive tea and coffee later in the day. ([Niformulary][6])

It also advises that if you remain awake in bed for more than around 20 minutes, it may be helpful to get up, do something relaxing and return to bed once you feel sleepy. ([Niformulary][6])

Occasional poor sleep is extremely common.

Persistent insomnia, severe daytime sleepiness or symptoms suggesting a sleep disorder are different and may need medical assessment.

A Simple Caffeine and Sleep Test

If you are unsure whether caffeine is affecting your sleep, try a simple experiment for one or two weeks.

  1. Keep your morning caffeine intake roughly the same.
  2. Stop caffeine at least six hours before bed.
  3. If sleep remains poor, move your final caffeinated drink towards lunchtime.
  4. Switch to decaf or caffeine free alternatives afterwards.
  5. Keep your bedtime and waking time reasonably consistent.
  6. Notice how long it takes to fall asleep and how rested you feel the following morning.

You do not need an expensive sleep tracker.

A note on your phone or in a notebook is enough to identify obvious patterns.

So, How Late Is Too Late for Caffeine?

There is no perfect cut off time for everybody.

As a practical rule, avoiding caffeine for at least six hours before bed is a sensible place to begin, particularly if you are having difficulty sleeping. ([nhs.uk][3])

Some people will benefit from stopping earlier.

If you continue to experience poor sleep, try moving your final caffeinated drink back towards lunchtime and see whether things improve.

And remember, being able to fall asleep after drinking coffee does not necessarily prove that caffeine has had no effect.

How well you sleep and how you feel the following day matter too.

Looking After Your Sleep in Northern Ireland

Keltoi Wellness provides doctor led remote healthcare support for adults across Northern Ireland.

Sleep can overlap with several areas of health, including stress, medication, weight and general wellbeing.

If sleep changes occur while you are receiving treatment through Keltoi, it is important that the treating doctor is aware where relevant.

Keltoi provides the administrative and patient support element of its services. Clinical decisions are made independently by the treating doctor.

Persistent insomnia, excessive daytime sleepiness or symptoms that could indicate a sleep disorder should be discussed with your GP or another appropriate healthcare professional.

Sources

NHS Insomnia Includes advice to avoid tea and coffee for at least six hours before going to bed. ([nhs.uk][3])

NHS Every Mind Matters Sleep problems Guidance on caffeine, sleep routines and when to speak to a GP about persistent sleep problems. ([nhs.uk][1])

Northern Ireland Formulary Good Sleep Guide Northern Ireland patient guidance on tea, coffee, evening routines and practical sleep habits. ([Niformulary][6])

NHS Foods to avoid in pregnancy Current UK guidance on caffeine intake during pregnancy and typical caffeine levels in common drinks. ([nhs.uk][5])

Sleep Medicine Reviews The effect of caffeine on subsequent sleep: A systematic review and meta analysis Review of 24 studies examining caffeine timing and its effects on sleep duration and quality. ([PubMed][2])

Sleep Medicine Reviews Coffee, caffeine, and sleep: A systematic review of epidemiological studies and randomised controlled trials Review examining the effects of caffeine on sleep onset, duration, efficiency and individual sensitivity. ([PubMed][4])

[1]: https://www.nhs.uk/every-mind-matters/mental-health-issues/sleep/?utm_source=chatgpt.com "Sleep problems - Every Mind Matters - NHS" [2]: https://pubmed.ncbi.nlm.nih.gov/36870101/?utm_source=chatgpt.com "The effect of caffeine on subsequent sleep: A systematic review and meta-analysis - PubMed" [3]: https://www.nhs.uk/conditions/insomnia/?utm_source=chatgpt.com "Insomnia" [4]: https://pubmed.ncbi.nlm.nih.gov/26899133/?utm_source=chatgpt.com "Coffee, caffeine, and sleep: A systematic review of epidemiological studies and randomized controlled trials - PubMed" [5]: https://www.nhs.uk/pregnancy/keeping-well/foods-to-avoid/?pubDate=20250529&utm_source=chatgpt.com "Foods to avoid in pregnancy" [6]: https://niformulary.hscni.net/patient-area/sleep-and-relaxation/review-copy-of-good-sleep-guide/?utm_source=chatgpt.com "Good Sleep Guide | NI Formulary"