Sleep button broken. How do I find out which part is affected?
You will most likely need to open the device to tell this. I used to work at an Apple Store and am familiar with the design of the iPhone 4 internals. Good luck. iPhones are not fun to repair.

Also an iPhone with a broken power button will still turn on after the battery dies. Simply plug into a wall charger and allow the battery to charge enough, and it will power back on.