What are options for power button
You can use apps like.   https://play.google.com/store/apps/details?id=com.enlace.doubletap

For sleep or wake this app works pretty well but I don't suppose if it's ever possible to power on the phone with an app installed in it and phone is switched OFF.