I have had these. My first one was when I was 16/17. My father had died that year and at his wake he smelled very strongly of formaldehyde. When the first anniversary of his death was coming, started smelling formaldehyde in my room for no reason.
In 2000 I had it again only I smelled a chemial/freon/ammonia type smell and this one happened on and off for months. I had a brain scan which was clear. I read yesterday that you can get this kind of thing from hyperventilating, which is something I do almost constantly. In fact I hyperventilated the month I was having the first smells when I was 16.
I have smelled flowers and also smelled poop that wasn't there. I had another brain scan in 2008 and that was clear as well.
I don't know why these things happen but I think some of it is stress and some is hyperventilation from stress. I also think some of it is psychological. I really believe you can smell things if you concentrate on them or fear them enough.