Answer:
Heat was trapped within the marshmallow.
Step-by-step explanation:
Increasing temperatures make air contained within the marshmallow extend to fill up more room, causing the versatile sugar combination to spread. Eventually, if there is so much tension? It's small explosion. But take the marshmallow out from the heat, and it's going to deflate even if the extended gelatin does not really recover quickly.