Brain Freeze -- it's that devastating, instantaneous pain in the temples that sometimes comes right after eating something frozen. And until now, researchers could never quite understand what causes it.

While previous studies have found that people who suffer from migraines are actually more likely to get brain freeze, a new study links brain freeze and other headache types to local changes in brain blood flow.

In the new study, a group of researchers took 13 healthy volunteers and had them sip ice water through a straw right up against the roof of their mouth. The volunteers were then told to raise their hands when the felt the familiar brain freeze come on, and raise them again once it disappeared.

Using transcranial Doppler, Jorge Serrador of Harvard Medical School, as well as five other researchers, evaluated cerebral blood flow velocity (CBFV) in the middle (MCA) and anterior (ACA) cerebral arteries while the 13 volunteers consumed the ice water. CBFV, heart rate, and blood pressure were analyzed, before pain, during pain and after pain.

Results from the study indicate that the sudden headache is triggered by an abrupt increase in blood flow in the anterior cerebral artery and disappears when this artery constricts.

According to The FASEB Journal, consumption of ice water produced an increased blood flow to the brain through the anterior cerebral artery, which is located in the middle of the brain behind the eyes. This increase in flow and resulting increase in size in this artery brought on the pain associated with brain freeze.

Serrador and his colleagues speculate that the dilation, then quick constriction, may be a type of self-defense for the brain.

The brain is one of the relatively important organs in the body, and it needs to be working all the time, study researcher Jorge Serrador, of Harvard Medical School, said in a statement. It's fairly sensitive to temperature, so vasodilation (the widening of the blood vessels) might be moving warm blood inside tissue to make sure the brain stays warm, he added.

The study goes on to suggest that because the skull is a closed structure, the sudden influx of blood could raise pressure and induce pain.

While this research study did focus on one brain freezes as a type of headache, it notes that similar alterations in blood flow could be at work in migraines, posttraumatic headaches, and other headache types.

And so as a result, if further research confirms these suspicions, drugs that stop these blood vessels from opening up, or that could make this blood vessel constrict could help treat them, according to the research

For a first hand look at the effects of brain freeze, check out this scene from the popular NBC series, Scrubs.