You should wait for an hour or longer to let it cool down.
Before all you should never ever again charge your phone when it is covered by a mattress or blankets. You risk burning down your bed and probably fatally harm yourself with that.
Also I would charge this phone only when supervised and on a metal plate or something that is fire resistant, as you probably brought your battery to near death now and swelling of the battery including ignition may be a result of this.
If you have a repair shop with original batteries, i would suggest to replace it for safety reasons.