Sleep and hibernation are problem prone. Since you're using a desktop computer and don't have to worry about battery time, the simplest solution is just to disable sleep and hibernation. On a desktop, you aren't prolonging the life of any of the components or saving an appreciable amount of power relative to your household electric bill or global warming. If you just want to hide the screen during periods of inactivity, use a screensaver.
If sleep mode is important to you, There are a couple of things you can check. Go into the Power Saving settings in the Control Panel (might have to go into "advanced settings" under whatever power plan is selected), and see if you have an option there to set the mouse and keyboard to never...