According to this website:
Texas resident Ariel Tolfree may have trouble sleeping for a while. The 13-year-old went to sleep with her white Galaxy S4 under a white pillow – and was awakened by a burning smell close by. The problem? Her Galaxy S4 was burning.
The Galaxy S4's battery was so hot during the night that it swelled, then burned not only the Galaxy S4 and through the pillow under which it was placed, but also her mattress.
Tolfree’s family contacted Samsung, who’s taken a look at the smartphone to verify whether or not the parts were originally from Samsung. The team discovered that the battery inside of it was a counterfeit battery from a third party, not an original Samsung battery.
Still, despite the fact that the third-party battery is to blame in the case, Samsung has agreed to replace the Galaxy S4 as well as the mattress and the pillow.
I keep my phone on the pillow next to me when I sleep. It's helpful for it to be that close to my head, as it's my alarm. But a flaming pillow is pretty alarming too.