I have a smiliar problem when i have a cold and have to breath through my mouth. The solution really seems to be to breath through the nose.
I usually keep a glass of water beside the bed in case i wake up with a dry mouth. Bad taste in your mouth can probably be avoided by using a tongue scraper:
Tongue cleaner - Wikipedia, the free encyclopedia
"Tongue cleaning is meant to remove some of the millions of bacteria (up to 500 different types [3]), decaying food debris, fungi (such as Candida), and dead cells, from the surface of the rear of the tongue. "
The decaying food, fungi and dead cells in your mouth can probably produce what you describe as bad taste.
I would also recommend using dental floss. If you don't use it, there will be more bacterias in your mouth then in your rectum. Which might also produce a bad taste in your mouth.
Dental floss - Wikipedia, the free encyclopedia