I discovered that if I only consumed caffeine when I had a Migraine headache, that it was the most effective medicine I could take provided I didn't already have a tolerance built up so I gave up caffeine in my 20s. Frankly, it was a lot harder than I thought it would be. I was plagued with minor but persistent headaches for almost a month and was exhausted most of that time since I was used to grabbing a cup of coff…
What was the medicine that ended up helping your migraines? I suffer from migraines semi-regularly and have at separate times taken Maxalt, Imitrex, or generic OTC migraine meds + caffeine.
Also, since starting a low-carb keto diet two years ago, I haven't had a single migraine (I used to get 2-3 per month, both painful ones and visual auras). When I was a pediatric neurology prof a few years ago, a keto diet was standard of care for the kids, and the department was starting research into keto for chronic migraines. Give it a try!