Sleep mode is an ongoing issue on many HP Printer models. In most cases sleep mode is causing network disconnections and the solution is to disable it along with assigning a static IP address to the printer. Your problem is the first I have seen where someone actually has trouble keeping it enabled.
A good first step here would be to restore the defaults on the printer. This should wipe out any strange configuration settings that would have occured by accident.