I'm not sure if I remember correctly what I was told by another friend, but it has to do with the caffeine causing the blood vessels in your brain to get bigger, allowing for more better flow of blood throughout your brain, thus reducing your headaches or migraines. Something like that, but lousy memory pwns me at the moment, so if someone knows, feel free to correct me.
It works for me about 85% of the time when I get a headache. I grab a Dr. Pepper and then I feel better, but if it is a headache from sleep deprivation (like going to bed way too late like 3 am) then a Dr. Pepper will not cut it. I just simply need to go to bed. And when I get those headaches, I end up throwing up every time, and they are not even migraines. I know what a migraine is like, I had only had one in my whole life, and it was the WORST migraine ever! It was so bad, I couldn't even move, I couldn't even handle light. I had to steal one of my friend's medication pills (I wasn't on that specific medication at the time but I am now) and it was 800 mg, so I could knock myself out. That pill knocked me out for the entire day. When I woke up, the migraine was gone, thank goodness! I just simply WILL NOT put up with trying to deal with a migraine if I can simply just knock myself out. It's just easier, even though I know it's not right to take someone else's medication, but at that point I simply did not care, all I cared about was NOT SUFFERING. (No, I would not recommend anyone here on AD to take someone else's medication for any reason, but I had to do what I had to do so I wouldn't have to suffer all day long with a horrible migraine. I just simply could NOT handle it at all and was desperate. It was so bad and so painful. Sure, I could go to the ER, but I knew that I could not handle walking the 4 blocks to the hospital with that horrible migraine, - one friend was in a hospital three hours away, the other friend was out of state at the time, and neither friends had a car - when I couldn't even move my head to start with! Suffice to say, desperate situations call for desperate measures, that's all.)