Chosen Solution

My iPhone screen becomes unresponsive periodically forcing me to press the Screen Lock button on top to turn off the screen After waiting a few seconds I again press this button and I am able to swipe to unlock the screen and the iphone starts to function normally for a few minutes or sometimes longer.

Try a force restart, or reset your settings, before trying a hardware fix How to Force Restart an iPhone 5 For a reset go settings<general<Reset<reset all settings Or settings<general<reset<erase all content and settings