You’ve probably experienced that unpleasant feeling commonly referred to as brain freeze, ice cream brain, or an ice cream headache. This sensation, which can cause a short-term headache lasting from a few seconds to a few minutes, may happen when you eat or drink something cold, like ice cream or ice water. The medical term for brain freeze is sphenopalatine ganglioneuralgia. You may also hear this sensation referred to as cold-induced headache.

Brain freeze is caused by the sphenopalatine ganglioneuralgia nerves (SPG), which is a group of nerves near the trigeminal nerve in the brain. These nerves are located behind the nose and the nerves that also cause headache pain. They are designed to be highly sensitive to pain, presumably to protect the brain.

The symptoms of brain freeze include a sharp and sudden onset of pain in the frontal part of the head. This can feel like a dull ache or a sharp pain. The pain can last anywhere from a few seconds to a full minute or two, depending on how much of the cold food or liquid you‘ve consumed and how quickly you’ve consumed it.

Scientists aren't exactly sure what specifically causes brain freeze. One tried to figure out the cause by measuring the blood flow and activity in the brain while participants drank ice water.

The researchers’ theory was that when the brain is cooled rapidly as a result of ingesting extremely cold food or liquids, it changes the blood flow in the brain. The cold is transferred from the roof of your mouth to the nerves of the brain, and this causes some kind of reaction in the brain.

The researchers used a Doppler, which measures blood flow, to look at the blood vessels in the middle and front brain arteries in 13 adults while they drank both ice water and room-temperature water. The participants drank ice water through a straw placed against the roof of their mouth until they felt a brain freeze. The researchers then measured the brain resistance, heart rate, and blood pressure of these participants before, during, and after the brain freeze.

They found that drinking the ice water increased the blood flow in the front brain arteries, but not the middle blood vessels. The ice water also caused increased resistance in the brain. With these findings, the researchers concluded that the pain of a brain freeze is actually caused by the increased blood flow and resistance in the brain blood vessels. So if you’re experiencing a brain freeze, you might actually be feeling your brain's blood vessels reacting to the cold. The study group was small, however, so more research is needed to understand the cause of this sensation.

The cause of brain freeze may be connected to the cause of migraines, which is also unknown. Several studies have found a between incidences of brain freeze and a history of migraines.

Learn more: Migraine vs. headache: How to tell them apart »

In a in Taiwan, 8,789 adolescents in junior high completed a questionnaire about “ice cream headache.” Forty percent of the participants had experienced an ice cream headache. Students who also had a history of migraine headaches had ice cream headaches more frequently. The researchers concluded that these ice cream headaches are more common in people who experience migraines.

Another study from examined cold-induced headaches in women and also found that participants with a history of migraines were more likely to experience brain freeze. They only saw an increase in cold-induced headaches among people who had a migraine in the past year. Those people were twice as likely to experience cold-induced headaches than people with inactive or no history of migraines.

The cure for brain freeze is actually very simple, and something you can do on your own. The moment you start to experience a brain freeze, press your tongue to the roof of your mouth. The heat from your tongue will transfer heat and energy to your sinuses behind your nose, which will then warm the nerve bundles that cause brain freeze. Keep your tongue firmly against the roof of your mouth until you feel the pain start to dissipate. You can keep your tongue on the roof of your mouth for as long as it takes for the brain freeze to completely disappear.

You don't need to see a doctor for a simple brain freeze that happens while you're enjoying a cold drink. If you’re experiencing regular headaches, however, you should seek the advice of a medical professional. The same nerves that are responsible for a brain freeze are also involved in serious headache disorders, such as cluster headaches. These types of headaches cause severe, regular pain.

Some identify a possible connection between consuming a cold beverage and atrial fibrillation (AF), which is a type of arrhythmia, or irregular heartbeat. This connection appears to be rare, but if you begin to experience irregular heartbeats after consuming a cold food or beverage, call your doctor. They may want you to come in for evaluation.

If your brain freeze lasts for more than five minutes, either with or without treatment, you may need to see your doctor. You should also seek help if you experience similar pain or discomfort when you haven’t consumed something cold or been in an extremely cold environment.

Brain freeze is not usually a serious condition. If you’re willing to risk the discomfort, you can continue to enjoy your favorite cold foods and beverages. In rare cases, you may experience other symptoms, like an irregular heartbeat, after consuming something cold. If you suspect AF, contact your doctor immediately. You should also call your doctor if you have intense headaches that last longer than five minutes after consuming something cold, or happen when you haven’t consumed something cold.

To prevent brain freeze, you can avoid some of the foods and drinks that are common causes of the sensation, such as:

  • ice cream and frozen yogurt
  • ice water (drink room-temperature or lukewarm water instead)
  • slushies
  • popsicles
  • ice cubes

If you find it hard to give up these cold items, try consuming them more slowly. This may reduce your risk for developing brain freeze. You can also try preventing brain freeze by taking a sip of a warmer beverage immediately before and after the cold beverage in order to keep the nerves warm.