I figured it couldn't be coffee because I fall asleep easily. But it turns out that lingering caffeine can let you fall asleep at bedtime and then come back to haunt you later when you move into lighter sleep.
I've been in denial about my caffeine consumption because I've gotten away with it until now.
I vibe coded a little caffeine metabolism tool to face reality. I wanted something with a simple half-life formula and drag and drop using common beverages.
What becomes clear very quickly is: my caffeine consumption needs to be way lower and earlier to fix my sleep issues.