Your device may heat up if you record your sleep while your phone is charging.
Make sure your device is sufficiently charged before beginning your sleep session, then leave it unplugged while it's tracking your sleep.
Additionally, depending on your device, and other applications currently in use, there is a chance that your phone will run out of battery while tracking your sleep.
If this happens, your sleep session will be saved as long as at least 90 minutes of data was recorded prior to the battery running out.