That usually happens because people use stimulants to accelerate energy burn and it dries you out, and when your body, especially your mouth, get dry, you will get bad breath immediately. If you want to test this out for yourself, try brushing your teeth while you feel very dehydrated. Your breath will smell bad soon after.
It's definitely a thing, you can smell when people are in ketosis