Your mouth is a microbial nightclub, and sometimes the bouncers let in the wrong guests. Certain bacteria can produce sweet-smelling compounds that trick your taste buds. This is often temporary—like after a sinus infection or a bout of acid reflux.
Think of it as your tongue doing a very confused jazz solo. It’s not dangerous, but it might mean you need to brush your tongue a bit more aggressively. (Or at least invite your dentist for a chat.)