Under "Power Options" you are able to change what certain things do in regards to sleep, hibernation, power consuption, shutdown, etc. One of the settings is to control what certain buttons do when you press them. These options can be found on the left side of your Power Options Window.

Access Power Options:

1) In the start search bar type Power Options and hit enter.
2) On the left you should see some options "Choose what the (name) button does".
3) If you're using a laptop you should have some options such as "Shutdown Button", "Sleep Button", "On lid close", etc.
4) Most likley your Sleep Button setting is set to "Do Nothing". Make the desired changes and exit.