Hi trojan1,
Welcome to the HP Forums!
For you to have the best experience in the HP forum, I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
I understand that you upgraded to Windows 8.1 and on startup, after a few seconds, it installs a bios update successfully, but then reverts back. Once it went to sleep you were unable to wake it. You had to disconnect and wait 20 minutes and then you were able to restart.
I suggest you take it back to Windows 8, then follow the update document I am sending. Once everything is completed, then restart your computer and upgrade to Windows 8.1. Updating Windows 8 to 8.1
Here is a link to Performing an HP System Recovery (Windows 8) to return it back to factory.