It was the early morning hours of July 5 and Americans across the country were feeling the after-effects of too much potato salad and a too many White Claws, or double IPAs. Maybe it was vodka sodas. Or wine. Hello dry mouth, headache, exhaustion, and upset tummy.

What did all these hungover peeps do? Some of the smart ones reached for their Pedialyte.

Yes, the over-the-counter remedy intended for dehydrated children (think: bad bouts of diarrhea) has become a much-touted hangover cure. And the crazy thing is this hangover hack works.

Adults make up a third of Pedialyte’s market, and that number is steadily growing thanks to a slew of new, more discrete Pedialyte products.

In recent years, the company has expanded its selection of powder packs that you mix with water for a more discreet way of getting your Pedialyte fix.

Pedialyte has increasingly catered to adult customers since its hangover-focused “See the Lyte” ad campaign in 2015. However, the marketing lingo still tiptoes around the term “hangover.”

Lindsy Delco, a public affairs director for Abbott (Pedialyte’s parent company), says the most common uses among adults are stomach flu, occasional alcohol use, heat exhaustion, and travel.

Pedialyte works well as advertised: It helps rehydrate your body. And after a night of boozing, we could all use a little help in that department. “Alcohol is a diuretic, which means its causes you to produce more urine,” says registered dietitian Danielle Hamo.

That’s why you go to the bathroom so much when you’re drinking and why you get dehydrated.

“Sodium talks to your kidneys and tells them to retain more water in the body,” says Justin Robinson, a registered sports dietitian. And potassium is one of the key nutrients that’s lost with all of those trips to the bathroom, so it’s important to replenish.

A bottle of Pedialyte has twice the sodium and five times as much potassium as the same size bottle of Gatorade — with fewer than half the calories.

Studies have shown that Pedialyte out-performs its competitors when it comes to electrolyte replenishment.Sollanek KJ, et al. (2018). Neither body mass nor sex influences beverage hydration index outcomes during randomized trial when comparing 3 commercial beverages. DOI: 10.1093/ajcn/nqy005

Pedialyte can take care of your sad, dehydrated self, but it isn’t the miracle cure for all of your hangover woes.

Drinking alcohol — especially in excess — can do a number on your digestive tract and sleep cycle, Bishehsari F, et al. (2017). Alcohol and gut-derived inflammation. and Pedialyte won’t help with either of those symptoms, Hamo says.

Also, although Pedialyte rehydrates people effectively, dehydration is not the only factor driving hangovers. Other compounds in alcohol like congeners, found in darker spirits like bourbon, can lead to more frequent and severe hangovers, research shows. Jayawardena R, et al. (2017) Interventions for treatment and/or prevention of alcohol hangover: Systematic review. DOI: 10.1002/hup.2600

Research also suggests that hangovers may be linked with age Huntley G, et al. (2015) An event-level investigation of hangovers’ relationship to age and drinking. DOI: 10.1037/pha0000037and sleep. van Schrojenstein Lantman M, et al. (2017) Total sleep time, alcohol consumption, and the duration and severity of alcohol hangover. DOI: 10.2147/NSS.S136467

The “no duh” best idea: Take a proactive approach while drinking rather than gulping down Pedialyte the day after, Robinson says. He suggests drinking a glass of water after every alcoholic drink and always making sure you’re drinking on a full stomach.

“If food is present in your stomach when you’re drinking, it will take longer for the alcohol to enter the bloodstream,” Robinson explains. “But grabbing a late-night snack to soak up all the alcohol you drank doesn’t do much to help.”

Though that egg and cheese sando will still taste amazing.