Samsung galaxy phones shuts down automatically I own a Samsung Galaxy Note. I have seen that very randomly and infrequently, my device just turns off on its own. I then have to restart it by pressing on the power button. 

Yes, the device has enough battery life left in it.

I have seen the same behaviour in my previous Samsung Galaxy S as well. 
Any one out here experiencing the same, or does any one know why its happening and what I could do to fix it?
I had the same behaviour, related to frequent "driving mode" madness. I don't know if the driving mode is an effect of the same cause or not, but when one stopped the other did too.

What I did to stop it (some might be BS, but It didn't do it a second time, so I can't find out what was the help)


Dry it off (some rain might have gotten into the USB port)
Clean the usb port.
Shut off, remove battery, wait 10 minutes
Restart.
Connect to wall-outlet-charger (full charge, as opposed to computer charge)
Stop charging it with el cheapo, very thin, shaky cables.