Since standard polyurethane foams do not melt as a thermoplast at 180°C, there are two explanations I can think of:
1)Soft PUR foams are produced using polyols and isocyanates with high molecular weights and have a relatively high degree of unlinked reactive groups in the end form. The heat loosens up the molecular structure and allows for unreacted (non-crosslinked) ends to find each other and undergo linkage. If the molecules are located on opposing parts you will have pretty good adhesion.
2)The temperature is enough to partially decompose the foam or some ingredients in it. The products may in turn melt or migrate, which would also lead to partial adhesion of the foams.
Perhaps somebody else can come up with an explanation which didn't occur to me.