Few people have reported their iPhone 5S overheating. This is usually related to the battery and goes hand-in-hand with rapid battery drain. In rare cases it could be caused by a hardware fault, but it’s more likely to be iOS 7 or a specific app. There are a couple of things worth trying to identify and fix the issue.
If you pay close attention to what you are doing when it next overheats. You might be able to identify the app or service causing the problem.
Press and hold the Sleep/Wake button and the Home button to reboot your iPhone 5S
Backup and restore your iPhone 5S and then be choosy about what you reinstall on it.
If problem persists then you have to go to an Apple Store to make sure there’s no hardware fault.