Quantity and timing go together
How coffee affects your sleep depends on more than the time of day. Caffeine quantity, other sources and personal sensitivity also matter. EFSA notes that even 100 milligrams can affect sleep in some adults, particularly close to bedtime. That does not mean everyone responds in exactly the same way.
An espresso is also not a fixed unit of caffeine. Bean, dose and preparation vary. Tea, cola, energy drinks and some supplements can contribute to your daily intake. A simple cup log is therefore only a rough guide.
What a study shows — and what it does not
A placebo-controlled, randomised crossover study with 23 young adult men compared 100 and 400 milligrams of caffeine at several times before bed. Crossover means participants completed different conditions and were therefore also compared with themselves. With 400 milligrams, sleep changes appeared even with a longer interval before bed. With 100 milligrams, this small study found no statistically significant difference from placebo.
This does not give blanket approval for 100 milligrams four hours before sleep. The study group was limited and people differ. Nor should anyone infer that 400 milligrams is a sensible single dose from the experimental design. A research protocol is not a consumption recommendation.
Observe your everyday routine
If you suspect a connection, record the timing and type of caffeinated drinks for a few days, along with bedtime and a rough account of your sleep. Keep other major changes in view where possible, such as alcohol, shift work or unusual stress. The log provides guidance, not a diagnosis.
Then try a simple change, such as having your last caffeinated coffee earlier or replacing it with Decaf. Observe over several days instead of declaring a single good or bad evening proof. Decaffeinated coffee can still contain small residual amounts.
No universal cut-off time
A fixed rule such as never having coffee after 2 pm may be practical for some, but it is not a biological boundary for everyone. Someone who goes to bed early has a different routine from a person working late shifts. The relevant question is how the quantity and interval fit your actual sleep.
Even tolerance does not automatically mean sleep remains unaffected. Being able to fall asleep after coffee does not tell you everything about sleep duration or interruptions. If sleep problems persist, a medical assessment makes sense rather than only changing your coffee variety.
Alertness does not replace rest
Caffeine can mask tiredness, but cannot fully replace missing sleep. So do not try to compensate for a persistently exhausting daily routine with ever larger quantities alone. Persistent daytime tiredness, heart symptoms or other unusual symptoms need professional investigation of the cause.
Enjoyment can have a very simple solution: your usual coffee in the morning, a suitable decaffeinated version or another drink later. You do not have to give up your ritual to choose quantity and timing more consciously.

