Caffeine and migraines have a complicated relationship. For some, caffeine is helpful to alleviate a migraine, and for others, caffeine is a trigger. Caffeine is a popular ingredient in over the counter migraine medications and a few prescription medications for immediate relief. In addition, caffeine withdrawal headache is a known phenomenon in which the removal of caffeine leads to a terrible headache or worse, a migraine. So does caffeine help or hurt? The answer is both.