The party is over. Everyone has gone home. You wake up suddenly and stumble in the direction of the kitchen. You may be disheveled and disoriented, but one thing is absolutely clear: You are starving. Eyes at half-mast, you search desperately, frantically even, for sustenance—when suddenly you see it. There, cast in a beautiful glow of grease, framed by an agape brown cardboard backdrop amidst gooey piles of left-behind cheese, there lies one last slice from last night’s pizza run: no heat-up required. Rejoice!

This story sounds like a happy ending—but the Debbie Downers over at the USDA disagree. If leftovers have been left out more than two hours, the officials say skip it.

But two hours is still a pretty big window—and sometimes refrigeration ruins food quality. So exactly how long is too long before that next-day-dinner becomes dangerous? Should you risk food poisoning in favor of flavor?

Reddit user AMA_or_GTFO wanted answers. “My girlfriend insists on letting her restaurant leftovers cool to room temperature before she puts them in the refrigerator,” AMA_or_GTFO posted in Reddit’s Ask Science community. “She claims it preserves the flavor better and combats food-born bacteria. Is there any truth to this?”

Scientists, food safety officials, and chefs weighed in: Some sided with waiting to refrigerate including one ex-chef who said the main culprit was condensation. When hot food cools quickly—especially when it is covered by a lid—moisture forms in the container that both ruins the texture and raises the risk for bacteria growth.

Still, most responders highlighted the importance of taking extra precautions to limit bacteria growth in the first place and said the sooner you can get your food in the fridge, the better. Reddit user Fearthejet, a food scientist, explained the process:

“After a normal cook, food bacteria goes into what they call ‘heat shock.’ During this phase, the bacteria goes into survival mode. This means a majority of the energy is spent on keeping the cell alive, not reproducing. Second, after the heat shock the bacteria will, at some point, begin to reproduce again. This is based on the specific bacteria conditions like pH, temperature, nutrient availability etc. This may be 30 minutes, or this may even be hours or a day or so.”

These pathogens leave behind toxins that can make you sick—or could even kill you. According to the Centers for Disease Control and Prevention, one in six people in the United States—that’s 48 million people total— get food poisoning each year. 128,000 will end up in the hospital, and 3,000 will die from food-borne illness.

While it’s unlikely that your room temp leftovers will land you in the hospital—and many of us have survived those next-morning pizza parties—it’s probably better to be safe than sorry. Or, as user Fearthejet puts it:

“So, should I refrigerate my food instantly, or let it sit to room temperature? YOU SHOULD REFRIGERATE YOUR FOOD IMMEDIATELY.”