It seems you have had an olfactory hallucination, you detect smells that aren't really present in your environment.
The medical term for the olfactory event most often occurs as a result of a head injury or upper respiratory infection. "It can also be caused by temporal lobe seizures, sinusitis, brain tumors, migraine, Parkinson's disease and stroke". Worst case scenarios.
Because phantosmia can be an indication of a serious illness, consult your doctor if you experience such symptoms.
Thanks for sharing your experience, take care.