For most people, brushing their teeth is a way to keep cavities at bay—with the pleasant side effects of a brighter smile and fresh breath. But we've all occasionally skipped the act before hitting the sack, whether out of pure laziness or extreme exhaustion. So how bad is it, really?

The Need-to-Know

The short answer: It doesn't matter if you brush your teeth right before bed. The most important thing is that you're brushing your teeth twice in a 24-hour period, says Kimberly Harms, D.D.S., a dentist and spokesperson for the American Dental Association.

Here's what's happening in your mouth: A film of plaque is constantly building up thanks to the bacteria that live there, and it takes about 24 hours to mature. (That fuzzy feeling in your mouth the morning after you forget to brush? It's alive!)

The most important thing is that you're brushing your teeth twice in a 24-hour period.

The bacteria produce acid throughout the day, and even more when you're eating, which is why you want to get rid of the film at least twice per day—any less and the acid byproducts may eat into your enamel and cause cavities. The longer the film sits on your teeth and the more food the bacteria feed on, the more time you'll spend cringing in the dentist's chair later on.

Speaking of which, dentists do recommend brushing when you wake up and before you go to sleep—for the sake of forming a habit. (If you simply can't get into bed without brushing your teeth, you're bound to keep your mouth clean and healthy.) Plus, morning-after dragon breath is real, and it can be scary. Brushing before bed is simply an act of kindness toward your bedmate and/or roommate.

The Snack Factor

As it turns out, brushing in the space between dinner and bedtime is technically even better for your teeth than brushing right before bed. That's because it gives the fluoride in your toothpaste more time to strengthen your teeth and build up their barrier to acid before you go to sleep, says Denis Kinane, B.D.S, Ph.D, Dean of the University of Pennsylvania's School of Dental Medicine.

Brushing sometime between dinner and bedtime is technically even better for your teeth than brushing right before bed.

But don't head to the bathroom right after you eat: Dinner is a time of peak acid exposure, which softens the surface layer of your enamel, says Greatist Expert Yanfang Ren, D.D.S., Ph.D. Immediately going at will remove the softened enamel and cause erosive tooth wear, so wait at least 30 minutes after dinner before you brush up. And avoid snacking after that—bacteria feeds off of any carbohydrates (we're not just talking about bread, they're in nearly every food).

The absence of our antibacterial saliva at night means we're extra vulnerable to cavity-causing agents and gum disease, Harms says, but don't stress if you forget to brush every once in a while. Ren says it takes a long time for plaque to calcify (a fancy way to say "turn dangerous"), and brushing enough should remove day-old plaque—just up your brushing time from two minutes to four, and you should be good.

Ingesting carbs constantly throughout the day also leaves people more prone to cavities. "If you snack all day long, the bacteria wake up and start producing acid every time you ingest any type of a carbohydrate," Harms says. During a typical meal, your saliva levels are higher, working to protect your teeth and aid in digestion. But as you graze throughout the day (or even slowly sip a cup of coffee), those repeated "exposures" to food give bacteria a meal every time, leading to more acid on your gleaming teeth.

The Takeaway

The most important thing to remember: It doesn't matter exactly when you brush your teeth, so long as you head into the night without bacteria (and the food they feed on) in your mouth. Just be sure to brush again in the a.m. and floss to get the bacteria out from between your teeth. And try to cut back on constant snacking—and maybe that second cup of coffee—to avoid feeding the mouth monsters within.

READ THIS NEXT: Which Foods Actually Stain Your Teeth (and Which Don't) Krave - Bottom Article - Live