Plug the iPhone / iPod Touch to the computer and open iTunes.
ITunes detects a time, turn off the iPhone / iPod Touch.
Hold down the Home + Sleep buttons for 10 seconds.
After those 10 seconds, release the Sleep button, but keep another 10 seconds the Home button.
When you pass the time, the device screen will be completely black, as if you were off.
It is advisable to use some kind of clock or timer to do, since it is necessary to do exactly, but we risk not getting it right.