it is a bug that was introduced in 7.1.1 update. This problem has been described in several topics in this forum. So far we have not found a solution, and no solution has been provided by Nokia either.
We have figured out that it happens if you use the camera. If you don't - the phone works OK.
So far the only option is to reboot the phone when it stops responding: press power button and volume up button simultaneously for some 10 seconds, and the phone will restart.
I have found a temporary work-around this. If I switch off and restart my phone after using the camera then it keeps working. Turning off the phone when I sleep instead of leaving it inactive also helps. Hope this works temporarily for you guys too!