doing the same thing that happens when you are in the car with the stereo on but the car not started, then you start the car and it resets itself, but not turn all the way off?
sounds like some wiring issue with the illumination/dim wires to the head unit
i would pull it out and trace those wires and see if that leads to anything
does the deck run off of a seperate wire straight to the battery or run through your accessory power?
it could also be your stereo taking a shit, but i doubt it