A few years ago I researched and posted about when--and when not--to drink coffee. I'm going to repost that article to https://www.softwaremeadows.com in the next several days. Until then, then gist is:
Science shows drinking coffee first thing in the morning negatively affects one’s circadian rhythm by inhibiting the production of cortisol, which the body uses to naturally wake us up. Instead, we should drink coffee between 9:30 and 11:30, and maybe also between 1:30 and 5:00, when cortisol levels are falling.
(I drink my morning coffee at least one hour after waking up, which is also supported by the research)