Below mentioned are some of the reasons for Mobile turn off automatically as follows, you may check out em firstly.
'''Check your applications''' - Try and think back to when you first started noticing your phone powering off and uninstall any applications that you might have downloaded, or updated, around that time. Try your phone on Safe mode and see if it fixes it.
'''Battery check''' - Tap on Battery Information, then check on the batteries health and make sure it says good. If it says poor or unknown error then power off the phone for some time and then power the phone back on.
'''Android version''' - Go through and remove unwanted apps and try restarting the phone, until there are no more apps that you personally downloaded on the device via some of the Sharing application.
'''Battery Pull''' - Before looking into performing a reset on the phone pull the battery out and make sure that it’s still in good shape.
'''Backup and Factory Data reset''' - If all these can’t resolve the problem, tryperforming a reset on the phone, make sure back up everything on the phone before hand.