In order to disable sleep mode on Windows 8.1 you need to open Power Options window (you may just click new Start button in the left bottom corner and type it in common Search box). By default you will have Balanced plan selected:
After that click “Change plan settings”. You will see the following window:
On this window you need to set “Put the computer to sleep” setting to Never (on example above it is already set to it). If editing will be disabled you will need to click “Change settings that are currently unavailable” link. You may change setting both for “On battery” and “Plugged in” options or only for one of them. Also you may disable turning off the display here. After that click “Save changes” button.
Many people stop on this step, but that’s not all. After saving changes click “Change advanced power settings” link and expand Sleep tree node:
Here you also may need to click “Change settings that are currently unavailable” link before it will be possible to change settings. Ensure that in “Sleep after” both settings are set to Never and in “Hibernate after” also both settings should have Never. By default in “Hibernate after’ in “Plugged in” it will have 180 minutes. You need to decrement it to 0 using up-down control, it will show Never when you will reach 0. Also check that under Hard drive “Turn off hard disk after” is also set to Never.
After that save all changes. Your Windows 8.1 computer should not go to sleep or hibernate anymore.