On my Win 8, control panel, power options, on my plan I select Change plan settings. In the new window select Change advanced power settings, you now get to Power options properties window. Expand Sleep, expand Allow wake timers, and change to disable. That might do it.
What is ransomware and how do I protect my PC from WannaCry?