Narrative:

On descent from 9000 ft to 3000 ft with the autoplt engaged, I accidently hit the avionics master and turned it off. In this plane, when the avionics are turned off, the transponder reverts to a certain default core (it doesn't hold the proper code in memory). I immediately turned the avionics on and started to reenter the transponder code, forgetting that the autoplt had also been turned off. When my attention returned to the flight instruments I realized I was in a spiral dive (60 to 90 degree bank and 4000 FPM descent). I immediately initiated a recovery but descended as low as 2500 ft and on the recovery climbed back to 3400 ft before regaining control of the altitude. I then returned to my original heading and altitude. I informed norfolk approach that I had a problem but did not specify what the problem was. Obviously the problem was caused by a lack of attention on my part. I should have realized that the autoplt had kicked off with the avionics master. I don't know why I got so concerned over the transponder code. At this time I had been up for 24 hour so I was tired which led to bad judgement on my part. I don't know if the transponder defaulting to another code is normal, but if it hadn't changed, I probably wouldn't have had this problem.

Google
 

Original NASA ASRS Text

Title: AN SMT PLT MOMENTARILY LOST CTL OF HIS ACFT AFTER INADVERTENTLY TURNING OFF THE AVIONICS MASTER SWITCH AT NIGHT IN THE WX.

Narrative: ON DSCNT FROM 9000 FT TO 3000 FT WITH THE AUTOPLT ENGAGED, I ACCIDENTLY HIT THE AVIONICS MASTER AND TURNED IT OFF. IN THIS PLANE, WHEN THE AVIONICS ARE TURNED OFF, THE TRANSPONDER REVERTS TO A CERTAIN DEFAULT CORE (IT DOESN'T HOLD THE PROPER CODE IN MEMORY). I IMMEDIATELY TURNED THE AVIONICS ON AND STARTED TO REENTER THE TRANSPONDER CODE, FORGETTING THAT THE AUTOPLT HAD ALSO BEEN TURNED OFF. WHEN MY ATTN RETURNED TO THE FLT INSTS I REALIZED I WAS IN A SPIRAL DIVE (60 TO 90 DEG BANK AND 4000 FPM DSCNT). I IMMEDIATELY INITIATED A RECOVERY BUT DSNDED AS LOW AS 2500 FT AND ON THE RECOVERY CLBED BACK TO 3400 FT BEFORE REGAINING CTL OF THE ALT. I THEN RETURNED TO MY ORIGINAL HDG AND ALT. I INFORMED NORFOLK APCH THAT I HAD A PROBLEM BUT DID NOT SPECIFY WHAT THE PROBLEM WAS. OBVIOUSLY THE PROBLEM WAS CAUSED BY A LACK OF ATTN ON MY PART. I SHOULD HAVE REALIZED THAT THE AUTOPLT HAD KICKED OFF WITH THE AVIONICS MASTER. I DON'T KNOW WHY I GOT SO CONCERNED OVER THE TRANSPONDER CODE. AT THIS TIME I HAD BEEN UP FOR 24 HR SO I WAS TIRED WHICH LED TO BAD JUDGEMENT ON MY PART. I DON'T KNOW IF THE TRANSPONDER DEFAULTING TO ANOTHER CODE IS NORMAL, BUT IF IT HADN'T CHANGED, I PROBABLY WOULDN'T HAVE HAD THIS PROBLEM.

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.