Your sleep quality.

Being asleep is one thing.
Getting optimal benefit from being asleep is another.
Sadly, your sleep after consuming caffeine can be scientifically assessed and found to be lacking in quality instead of quantity. That matters. It is the equivalent of eating snack food for dinner. You will only know this about your sleep subjectively by feeling unrefreshed when you wake up, feeling tired at a point in the day much earlier than you would expect, or seeing other signs of fatigue like forgetfulness or clumsiness for no other reason. Assuming that you are getting older or that your job is overwhelming you could be incorrect assumptions.
Your evening cappuccino or soda could be the cause, or a least the biggest contributor, to a rough day after a full night of sleep.
You were tired enough to fall sleep easily, and you may not recall awakening briefly during the night. Your brain remembers. Somnography (where brain waves are measured, along with muscle tension, heart rate, etc.) tells the story of your liver’s efforts to process caffeine during sleep. Caffeine is particularly damaging to the deep sleep phase. This is the phase in which you get the most help solidifying information learned the day before, reap the greatest cardiovascular and neurohormonal benefits of sleep, and clear out the detritus of brain processing through the CSF’s housekeeping functions. That last one is the effect suspected to be neuroprotective against Alzheimer’s disease.
OOPS.
The half-life of a caffeine is 6-7 hours. The quarter-life is 12 hours. Even in people who are genetically-fast metabolizers of the drug, it matters. This means that some caffeine from your lunchtime coffee is still in your system at midnight, working its way through your bloodstream and into your brain. If you want to get the full benefit from your night of sleep, reconsider your PM coffee or tea.