If you face the problem of Xperia Z1 restarts itself or reboots randomly, ensure that all the apps on the phones are upgraded to the latest version. You can also check if the phone is working on the latest firmware. You can do this by going to Settings – About Phone- Software Updates- System Updates
Boot the phone in safe mode to find out the apps that may be causing issues. Turn off the phone, and press the power button till the phone begins to vibrate. When you come to the Xperia Logo screen, press and hold the volume down key till the phone starts in the safe mode. If you find the Xperia z1 heating problem is solved, restart the phone and delete the particular app.
Reset Z1 to factory settings, if the above does not work. You can do this by going to Settings – Backup and Reset- Factory Data Reset – Reset Phone