Shut Down and Reboot Issues
Malware doesn’t usually care if you are or aren’t using your phone, which means an infected iPhone can power cycle strangely. One thing that victims often notice is that their iPhones seem to have issues shutting down, powering up, or rebooting. These phones may suddenly turn off if you are using them, or may try to reboot out of nowhere when there aren’t any software updates to install. The phones may also light up at odd times as if someone was invisibly trying to access it.
Keep in mind that battery problems can also cause many weird power issues. However, you should always consider the possibility that your phone has been hacked. Take it into an Apple Store to find out for sure.