IPhone 5s overheated while charging?

Last night my phone was charging by my bed and I woke up in the middle of the night to a buzz so I checked and got that temperature warning and my phone was extremely hot to the touch! It was scary and that's never happened before. I wasn't even using it?

Conspiracy man…

When charging a phone make sure your not using it since you said you weren't using it well I suggest that it may have been because the charger was not doing it's proper job and you should try and buy a new one maybe