before you go to sleep? If you don't, you're just keeping food and stuff in your mouth and you typically don't swallow when you sleep, so it'll just taste worse in the morning.
Also, you could be burping up food (vomiting n your mouth) and that could make it taste worse.
Certain kinds of pills can also make your mouth taste worse.
Just brush your teeth