It may be that your gums are under stress due to plaque, trapped food, or gum disease - with the result that they bleed when you brush your teeth. When you sleep while your gums bleed, the blood collects in the recesses of your mouth and breaks down, producing a nasty-tasting/smelling mouth in the morning.
To check if this is the case, when you brush your teeth, see if the toothpaste you spit out is pink. If it is, you might be able to correct the problem by thoroughly flossing, then using a baking soda/peroxide toothpaste, and spending more time running your toothbrush all the way down the sides of the teeth, so it is brushing the gums, too.
Discuss this with your dentist, too.
If your toothpaste is not coming out pink, then the morning mouth is more likely the result of a nose or sinus problem.