If you’ve ever woken up to a dog panting in your face, you know morning breath can be a problem. But the dog might be suffering from you, too. Having halitosis, or bad breath, upon waking is a common occurrence. But what causes it?

According to Sally J. Cram, a Washington, D.C.-area periodontist who spoke with Everyday Health, foul breath in the morning is attributable to our mouths drying out while we sleep. Without moisture, bacteria that causes odor can multiply. Snoring or breathing through your mouth can worsen the issue.

Additionally, medications that cause mouth dryness can make the situation even more unpalatable, especially if they’re taken right before bed. Allergy sufferers get it from both sides. If they take allergy medication, they might create a desert landscape in their mouth. If they don’t, mucus from allergic reactions present a buffet for bacteria.

Diet is also important. Eating pungent food like garlic or onions before bed can have residual effects even hours later.

The steps to combat bad morning breath are pretty well understood. Brush and floss before bed and when you wake up, and don’t forget to scrub your tongue each time. (Bacteria like to collect on the back of the tongue.) If you use mouthwash, make sure it’s for the recommended duration—typically 30 seconds. Any less and you’re not giving it time to kill germs. You can also drink a little water before hitting the pillow. If bad breath persists, it might be time to visit a dentist.

[h/t Everyday Health]