Have had several occasions like that on different versions.
Found out that actual reason was a pack of gum in the same pocket with phone.
Somehow it manages to press down power button long enough to cause it to hard reboot.
I think it's something that should be disabled, at least an option would...