The short answer is that bacteria love the wet, warm, Petri dish you've provided them. The multiplying bacteria release stinky compounds (some 600 or so of them) that make a mess of the place, and there's not a whole lot you can do about it.

Basically the bacteria that exist during the day are diluted by your saliva. When we're sleeping, saliva production is significantly reduced. This means the bacteria are left to multiply for hours.

Swaby also reveals a startling fact: Scientists estimate that there are more bacteria in one mouth than there are people on Earth!

The bad smell is the result of microbe decomposition. Those germs are dying and coming back over and over again at any given moment. That's why it's very important to brush, floss and rinse when you wake up, a routine that will also help you live longer.