I used to get a similar stink whenever I had bedside lamps turned on after a while. Turned out the plastic 'bakelite' ring that screws onto the bulb socket starts to lightly burn (it yellows) and consequently smell rather bad as it gets hot. I cut them down so that they were not so close to the bulb...