Almost everyone has experienced it, sooner or later: that immobilizing brain freeze you get when eating an ice cream too quickly.

But this week scientists have revealed why they think it happens, and the new information could possibly help chronic migraine sufferers.

It happens when cold drinks and ice cream cause pain due to prolonged contact with the roof of the mouth, hey presto you have brain freeze. The discomfort vanishes when the palate warms up again.

Now, according to a report in the Irish Times, the National University of Ireland Galway has focused on the pain induced by brain freeze as a proxy for other types of headache including migraine. The study has examined local changes in brain blood flow as a trigger for pain.

Professor Jorge Serrador of Harvard Medical School led the study with assistance from Galway’s professor of electrical engineering Professor Gearoid O Laighin and PhD student Brian Deegan.

The common experience of brain freeze proved ideal for studying the onset and completion of localized pain given the shortness of symptoms, O Laighin said.

Subjects in the study were asked to sip iced water to induce brain freeze and then the researchers used ultrasound to measure the velocity of blood flowing through blood vessels in the brain as the pain persisted and faded.

The researchers found that one blood vessel in particular, the anterior cerebral artery, dilated as brain freeze arose, flooding the brain with extra blood. The pain then receded as this artery closed back to its normal state.

The Irish researchers have speculated that this could be an important self defence for the brain, stopping it from cooling too much. The flood of extra blood warms the brain but simultaneously causes higher, pain-inducing pressure inside the skull that diminishes when the blood flow reduces to its normal state.

Professor Serrador and his researchers have speculated that similar changes in blood flow patterns could be at work in migraines and other types of headache. The professor presented presenting his research findings during the San Diego Experimental Biology 2012 meeting this week.