Then I learned: six hours after your last coffee, half the caffeine is still in your body. Coffee at 3pm means caffeine circulating at 9pm, making it harder to fall asleep.