While checking alarm for next work day at 21:45 I saw on alarm app sleep setting. I went through made my selections and set for 22:00-04:00 working days. I clicked turn on at approx. 21:50 immediately the screen turned off with no input reawakening the screen. The only way to get into the phone was to connect to pc via cable. I couldn't rabbit to recovery straight I had to press volume up & down and power together to shut phone off then reboot to recovery. I wiped cache and rebooted. When powered up the phone was sort of half in and out of the sleep mode as notification shade was dimmed as per sleep setting. The phone screen then shut down again after a few seconds. I used the cable shut down method three more times to reboot and try to beat the screen shut down to get into alarm app to turn off the sleep setting. I managed on third attempt. Serious fault if I needed phone for emergency in that period. Log Sent.