From I did not know that yesterday!:
Science guru Bill Nye explains that the flow of saliva slows down during sleep. As a result, mouths don't get the same level of oxygen as they do while we're active. This allows anaerobic bacteria, which don't need oxygen, to thrive. "The waste products from these bacteria often contain sulfur -- and those compounds of sulfur are what we smell."
Onions are also nasty culprits of this type of bad breath because they contain sulfur. So limit your raw onion snacking habits, and you're ahead of the game.
According to BreezeCare, there are additional causes for morning breath. Mucus in your nose can thicken while you sleep, and your tongue falls to the back of your throat -- both of which provide welcome environments for anaerobic bacteria.
Treatments for bad breath abound, however the two common solutions are to brush your tongue to remove excess plaque, and the use of an antimicrobial mouthwash. Good luck, and may your breath be as fresh as a Tic Tac.