Hi
Be sure to follow Apple's guidance when using and/or charging your iPhone.
The Important safety information includes:
Prolonged heat exposure
... don’t sleep on a device or power adapter, or place them under a blanket, pillow, or your body, when it’s plugged into a power source. It’s important to keep iPhone and its power adapter in a well-ventilated area when in use or charging ...