If you are afraid of failing of the power button for some reasons so that you can not use it to restart the machine then this is the way to help you restart the iPhone without the power button.
Step 1: Go to settings> general settings> accessibility.
Step 2: Turn on AssistiveTouch.
Step 3...