The main one has to be worse sleep quality.
The main one has to be worse sleep quality.
And no it’s quite likely not the the chicken the the egg problem.
Don’t get me wrong downing 3 double espresso shots 30 min before bed time is probably not a good idea however there is nothing that indicates that caffeine consumption during the day would have an impact on sleep in fact many studies showed that moderate amounts of caffeine even 2 hours before bed did not have a negative impact on sleep and a few studies even showed improvement in REM sleep when caffeine was taken but again nutrition studies are notoriously problematic.
Controlling for all the factors is nearly impossible.
Age, life style, genetics and everything else in between introduces so many variables that you simply can’t estimate or predict their impact on the study.
Even in your specific example it might be caffeine dependency or it might be something else completely like giving up 3-4 americanos a day and not making up for the liquid intake loss which left you more dehydrated in the evening.