It's not very common, but it usually happens when we haven't brushed our teeth in a while (as when waking-up), or we have a disrupted ph balance, hence a proliferation of non-friendly bacteria thriving in our mouths.
Chewing a pinch of green leaves such as those from, parsley, cilantro, mint, anis, etc... will leave your mouth fresh and with a much better flavor.
You can brush your teeh with sodium bicarbonate to neutralize odor and kill many bacteria that could be contributing to the reaction you're having...