iPhone 5 could heat due to how bright the screen is, certain apps that could be ruining or loading data, how much the device is being used, how much the phone forces to get signal or what type of temperatures your device is being exposed.
If you charge your device over night, you are over charging the battery meaning the lithium inside heats up and over time wears out. I would recommend you unplug it once it is fully charged and not charge it over night. Your battery lifespan will last longer.
LTE will use a good amount of battery life and may heat your device if used constantly or for a long time, now that it is faster than 4G and data uses more battery.
Certain apps like Facebook or Maps could heat up your device as well. Facebook uses data for constant feed and notifications something Apple has nothing to do with but the Facebook app engineers. Maps uses location every time your device is moved to a one place or another meaning data/LTE is being used.
If your device continues with heating problems even if all of the above have been followed or avoided, then call and set up and appointment with Apple Support or go to your local Apple Store. They will be more than happy to help you fix the problem or replace your defected device.