As one of life’s simple pleasures, ice cream should not have the capacity to cause spontaneous and agonizing pain immediately after ingestion. Yet ice cream and other extremely cold food frequently catches us off-guard by inciting what is known as “brain freeze” or “ice cream headache.” Fortunately, there’s a way to alleviate this harsh side effect.

According to Johns Hopkins University, a bout of radiating pain in your head after eating cold food is known as cold neuralgia or sphenopalatine ganglioneuralgia. It’s likely caused by your body entering survival mode when it detects a freezing temperature on the palate (roof) of the mouth: our system constricts blood vessels in the palate to preserve our core temperature. When they rapidly open back up, a pain signal is sent to the brain via the trigeminal nerve. Since that nerve leads directly to the midface and forehead, your face bears the brunt of the referred pain from the mouth.

A brain freeze typically lasts less than five minutes. But when your head is throbbing, that can feel like forever. To minimize the pain, the best strategy is to warm the palate up. You can do this by pressing your tongue or a thumb against the roof of your mouth, by drinking a warm liquid, or both. Covering your face and breathing into your hands can also warm the air inside your mouth that was chilled by the ice cream.

If you want to take preventive measures, avoid gulping cold drinks and take smaller bites. Holding the ice cream in your mouth to warm it before swallowing can also reduce the potential for a painful end to your cone or slushy drink.

[h/t Johns Hopkins Medicine]