I had a similiar case with influeza the past december. I didn't eat for 4 days, fever for a long time, and low energy during the whole 4 weeks it took me to get back to normal.
I couldn't drink coffee or alcohol during those 4 weeks, and notice that I didn't get any migraines after those 4 weeks even when I, for the past 12 years, knew exactly how I got them reliably.
I didn't make sense to me to keep drinking coffee because the benefits of coffee which for me was mostly ritual and taste, didn't outweight the weight of having a migraine for sure if I slept a minute less than 8hrs.
Mind you, I'm talking about a cup almost everyday with milk, ice coffee in the mornings.
The feeling you got when tinkering is the same I got when first studied formal electronics in HS. I didn't do college, but the only one from my graduation year who stayed into electronics until now it's me. It's been 12years and I'm still doing it. I've been blessed enough to have encountered people that paid me to do Industrial Design and Product R&D.
I'm now currently in manufacturing and automation.