Coffee is a stimulant meant to keep you awake. It delays your circadian rhythm and the release of melatonin, preventing you from getting tired. This can be positive early in the day if you’re feeling a bit more fatigued than usual but is frustrating later in the evening. Late day coffees also reduce the amount of deep sleep you achieve, deteriorating the quality of your sleep in the evening. It’s best to keep your coffee consumption to the beginning of the day in order to protect a healthy sleep cycle and maintain good sleep hygiene.