User blog comment:Mmpratt99 deviantart/Is it Possible To Smell Odors in Your Dreams?/@comment-26399604-20151223131431

I believe it is possible. Since our brains are programmed after an extent of experiencing everyday occurrences. Like when our mouths water when we see something delicious like maybe a chocolate chip cookie. You haven't eaten it yet, but your mind recalls the taste of the flavors and you already know what to expect and you anticipate it.

I think the same principle can be applied to dreams too. You see something and it either registers as appalling or delightful because your brain has already categorized that sensation for future reference. This of course can be for any of the senses not just the one for smelling.

I'm guessing you had a recent unpleasant dream with something rancid. :P