There have been some mentions of this warning found in the iPhone user manual. It’s good advice! Also mentioned: Beware of non-Apple charge cables and power adapters.
“Don’t sleep on a device, power adapter, or wireless charger, or place them under a blanket, pillow, or your body, when it’s connected to a power source. Keep your iPhone, the power adapter, and any wireless charger in a well-ventilated area when in use or charging”.
https://support.apple.com/en-lamr/guide/iphone/iph301fc905/ios