Halloween candy can give you a 'sugar hangover.' Experts weigh in on how much is too much.

Halloween is here, and you know what that means: a hall pass for a guilt-free sugar splurge.

Although you might feel an initial burst of energy, eating too much Halloween candy too quickly will inevitably make you feel icky — an unfortunate reality that some experts call the “sugar hangover.”

“You can’t have the high without the crash,” said Melanie Murphy Richter, a registered dietician nutritionist in Los Angeles, California, who said this sugary hangover can “feel just as bad or even worse" than the real one.

But you can still have your cake and eat it too (literally), experts say. Here’s what the science says about candy binges and how you can still enjoy yummy foods without feeling terrible this holiday season.

What happens when you eat too much sugar?

When you eat candy and other sweets, processed sugars flood your stomach where they’re immediately broken down into another type of sugar called glucose: our bodies’ primary source of energy, said Dr. Brittany Bruggeman, a pediatric endocrinologist and assistant professor at the University of Florida College of Medicine.

Your stomach and small intestine absorb that glucose and release it into your bloodstream. This spike in blood sugar signals your pancreas to release a hormone called insulin to move sugar from blood into your cells to be used for energy.

The result: a short burst of “the zoomies,” Richter said, similar to what many parents say happens after they give their child some candy (although the "sugar rush" concept is a topic of hot debate). Sugar also activates the brain’s reward system, which triggers the release of the “feel-good” neurotransmitter called dopamine, making us feel pleasure and satisfaction.

When you eat too much candy too quickly, however, sugar will build up in your blood, causing headaches, fatigue and thirst in some people, Richter said — especially if on an empty stomach because no other nutrients are present to balance the sugar out.

What is a sugar hangover?

Shortly after the “sugar high” comes the “sugar crash,” or what Richter likes to call the “sugar hangover.”

Eating more sugar than your body can handle sends your pancreas into overdrive, Bruggeman said, spitting out so much insulin that your blood sugar drops dramatically. This is especially dangerous for people with pre-diabetes, type 2 diabetes and polycystic ovary syndrome, she added.

You may start to feel shaky, sweaty, tired and dizzy, and you may develop a headache and some brain fog — a general icky feeling that tends to last longer than the “high,” Bruggeman said.

It’s not uncommon to have diarrhea too because sugar pulls water into the gut, loosening your stool, Richter said. Excess sugar that isn’t absorbed by your body will also sit in your bowels where bacteria will break it down (a process called fermentation), which causes gas, bloating and cramping.

If candies, cakes and chocolates aren’t your vibe and you prefer to down sodas or milkshakes instead, expect to enter a hangover phase more quickly, Richter said. “Anything in liquid form is going to be digested exponentially faster because it doesn’t have to be broken down by our digestive system,” she said. “Whereas candy might take 20- to 45 minutes to make you feel bad, a soda could be closer to the 10 to 20-minute mark.”

Tips for a "healthy" Halloween: Is there 'healthy' candy for Halloween? Don't get tricked by these other treats.

This sugar rollercoaster stresses your body out so much it pushes it into fight or flight mode, giving the stress hormone cortisol the green light to run wild, Richter said. Ever wondered why you feel anxious or down after eating a lot of sugar? That’s because cortisol blocks the production of serotonin and dopamine, which normally help us feel happy, relaxed and satisfied.

Experts recommend drinking lots of water and getting enough rest to feel better.

How to enjoy sweets without feeling terrible

You don’t have to feel gross every time you eat candy or other sweets on holidays like Halloween. The trick, experts say, is to fill your belly up with a meal rich in protein, fiber and fat within the hour before feasting on sugar.

“This will significantly slow down the uptake of that glucose by a long shot,” Richter said.

If you don’t have time for a meal before a sugar splurge, try opting for sweets like peanut M&M’s or a Snickers bar that have other nutrients in them to help balance all that sugar out.

Most popular and hated Halloween candy: From Candy Corn to Kit Kats: The most popular (and hated) Halloween candy by state

You can also squeeze in some moderate exercise after eating a lot of sugar, Bruggeman suggested, because your muscles will use the sugar for energy, reducing the insulin spike that causes those hangover-like symptoms.

While you should allow yourself to enjoy yummy foods guilt-free during the holiday season, eating sugary foods on a regular basis can make you crave them more often, as the bacteria in our gut like to munch on glucose too.

“These pathogenic bacteria also often block the production of serotonin and dopamine,” Richter said, “which can lead to mental health issues down the line.”

This article originally appeared on USA TODAY: Halloween candy can give you a 'sugar hangover': What you need to know