My guess is that it is an electrical problem; maybe the switch I mentioned above. My Sentra does exactly what you have describe and it only occurs once ever couple of months. Electrical problems can be difficult to diaginos. Even if you take it to the dealer, if it doesn't occur when you take it in, they probably can't help you much.