Alcohol would be a very good explanation if you were consuming enough of it to become intoxicated. At some point after intoxication, the hangover effect happens. If you go to bed intoxicated from earlier drinking, thay effect could possibly come 3 hours later. It does that for me if I over-indulge and i find myself up at 3 or 4 AM taking mineral replacements and water.
Coffee is a touchy subject as most of us would likely be better without a massive dose of adrenal crashing stimulant first thing in the morning, but I love mine too. Just from memory of recent research, there are 3 issues with coffee. First, some people with gluten intolerance, or sensitivities can be affected as coffee seems to be a cross-reactant which can trigger similar effects. Secondly, coffeee can be an auto-immune trigger for people dealing with any number of auto-immune diseases... Depending on which part of the immune system is going haywire, there is a 50/50 chance that coffee can be a problem for you... Third issue is what seems to affect myself. Coffee causes reduction in appetite while also triggering rapid metabolism and calorie burn. We need fuel to go with it. I often neglect to eat brakfast with my morning coffeee and punish myself this way quite often. I have gotten some help from a trick i found somewhere and found it actually quite enjoyable. Add a teason or tablespoon of unrefined coconut oil to the coffee. Good for the heart and body and it will be used as fuel in this way to help prevent or reduce the crash.