What do you mean by turn it off and on ? from sleep mode ?
If you mean power, the only only way power your iphone on/off is using the power button on the top of the iphone. You can also power it on by plugging it. To power it off you have to wait for the battery to be empty.
If your iphone is jailbroken, you can install SBSetting via cydia, it has an option to power off the iphone.
If you mean turn on/off to sleep mode, you can use either the power or home button to wake it.
I recommend replacing the defective button, tell me exactly the one that is defective :
- the black one on the bottom of the device ? on the front pannel ?
- or the metal one on top of the device ?