This has been a problem since Jelly Bean, using various Nexus 4, 5, and 6 devices. There are even a few open support tickets that the +Android Developers
team seem to ignore.
The device will randomly go to sleep and wont wake back up, but a long press on power works to restart the phone. This happens after a factory reset, and on phone with other apps on it.