There are methods that can be used in order to fix your phone that is power-cycling:
1. Check your protective case
Some protective cases are a little too snug and can actually put pressure on the power key causing the phone to power off or on sporadically.
2. Make sure the battery is snug
Make sure that it’s nice and snug and that the metal leads on the phone and battery are staying connected to each other.
3. Check the batteries condition
Check the Liquid Damage Indicator (LDI) on the battery and make sure that it is still white.
4. Run a battery test
5. Check your applications
6. Upgraded Software
7. Backup and reset
Resetting a phone is often a last resort for most situations but a factory data reset on an Android phone can often times fix most phone related issues, especially when it comes to software.
Hope this info helps.