It’s summertime. It’s hot outside. You’re hot. Cooling off with an icy indulgence seems like a great idea. But as you stuff that frozen yogurt down your gullet something decidedly unpleasant happens: the dreaded “ice-cream headache.” Why is it that slurping slushies, gobbling gelato, or inhaling Italian ice can cause such wicked, intense bursts of head pain?

A surprising number of scientific studies have looked at the cause and prevalence of the phenomena (including at least one in which school children were asked to scarf down ice-cream in the name of scientific discovery). The prevailing theory is that the ice-cream headache sensation results from cold food contacting a nerve-filled area on the roof of your mouth. One of the nerves in this region, the “trigeminal nerve,” is the largest cranial nerve. Its three branches work together to sense and communicate information between the brain and the different areas of the front of the head – including teeth, tongue, and palate.

Though it is the roof of the mouth that is exposed to the cold, the pain of fast ice-cream eating manifests itself, obviously, in the head. There are a few theories involving the trigeminal that explain the sensation. One has it that the pain of an ice-cream headache is an example of referred pain. In other words, instead of feeling the consequences of the cold at the site of contact, the pain manifests itself elsewhere along the nerve pathway — usually as an intense pain in the forehead, although some people also experience pain in the temples or other parts of the head.

Another idea that is often mentioned is that the trigeminal nerve senses the cold sensation contacting the palate and – in an effort to increase blood flow to the brain and keep it warm – reacts by dilating blood vessels in the head. It is thought that this over-zealous attempt to warm up your brain alters the blood flow, causing a pulsating headache.

Gobbling ice-cream too quickly increases the incidence of headaches, according to a 2002 study of ice-cream headaches in middle schoolers published in the British Medical Journal. The researchers suggested that licking ice-cream slowly could help stem the wave of cold-induced pain – but not always.

Fortunately, ice-cream headaches don’t last long – usually 10 to 30 seconds – but their pain can be breathtaking. Some research suggests that individuals who are prone to migraines are also more susceptible to ice-cream headaches. Interestingly, migraine and cluster headaches seem to be caused by a similar, albeit probably differently triggered, activation of the trigeminal nerve that may cause pain in other regions of the head. This means that for those of us who have never experienced the searing pain of migraines or cluster headaches, an ice-cream headache may be as close as we get.

At least one physician has gone as far as to propose inflicting mandatory ice-cream headaches on medical students as part of the med-school curriculum. “I think that all physicians and physicians-in-training would benefit and should be made to experience the exquisite pain of ice-cream headache to help them understand, empathize and appreciate the urgency for sufficient prophylaxis and treatment of the pain of their cluster headache patients,” wrote Dr. Eric Lewin Altschuler, a physician and researcher from the University of Medicine and Dentistry of New Jersey, in a 2006 article for the journal Medical Hypotheses.

So far, the jury is still out on the necessity of unleashing a flurry of Dairy Queen Blizzards on unsuspecting med students. But if your summer includes ice-cream, ice pops, iced coffee, popsicles, Creamsicles, icicles or other frigid foods, the best advice available, for now, is eat slowly.