Narrative:

Cruising at 5000 ft MSL smelled electrical smoke. Began descent out of 5000 ft and noticed ATC of intentions. I never received a clearance to descend, so I canceled IFR out of about 4500 ft MSL. I needed an immediate clearance for lower. After a 500 ft descent I canceled IFR. No emergency was declared. I landed without incident.

Google
 

Original NASA ASRS Text

Title: ALTDEV EXCURSION FROM ASSIGNED WHEN PLT DISTR SMOKE IN COCKPIT CREATES NEED FOR DIVERSION TO ALTERNATE ARPT.

Narrative: CRUISING AT 5000 FT MSL SMELLED ELECTRICAL SMOKE. BEGAN DSCNT OUT OF 5000 FT AND NOTICED ATC OF INTENTIONS. I NEVER RECEIVED A CLRNC TO DSND, SO I CANCELED IFR OUT OF ABOUT 4500 FT MSL. I NEEDED AN IMMEDIATE CLRNC FOR LOWER. AFTER A 500 FT DSCNT I CANCELED IFR. NO EMER WAS DECLARED. I LANDED WITHOUT INCIDENT.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.