Inside the grinding chamber, there is probably food waste that is starting to go bad. It could be that you didn't grind the last batch long enough or that food is stuck in the machine or didn't go down the drain properly.
To get rid of these smells, you should fill the unit with a lot of cold water and turn it on. Let it grind and flush out everything in the chamber. Next, you should clean your disposal well to get rid of any bacteria that may still be there and be causing the smell.