Unexpected restarts may be caused by overheating or a bad battery. Is the phone hot to the touch when it restarts? is the battery swollen or warped?
You may be able to check your battery’s health by dialing *#*#4636#*#* on your phone’s dialer keypad. Select Battery Information in the screen that appears. If you battery’s health is listed an “unknown” or if the temperature is above 40 degrees Celsius, suspect a bad battery.