Does this happen when you are only doing that, or when doing all regular things on your phone? Also, did it start only after certain apps were installed or updated? I ask because it can be an app causing this, rather than the phone itself.
I would try starting your phone in "Safe Mode" and run it that way for a while (which will restrict app access) and see if the problem occurs. If it does not, then you know it is an app or something else you installed that is causing this. If it still occurs then it may be in the phone itself.
To get into "Safe Mode" please do the following.
1. First turn off the phone.
2. Next press and hold "Power" until you see the manufacturers logo on the screen, then release the power button.
3. "Quickly"...