I'm not sure whether or not the phone has actually turned itself off, but I believe it's still on, just unresponsive. In order to get it working again, I have to hold the power button for a good 10 seconds, wait, then press the power button again to start it up.
It happens just randomly...