Bit of a thread revival but searching for an issue pulled this up.
Just to add to the above, the staples in the backs are very easy to reuse and refit.
No machine required, just time.
All you need to do is 'close' the staples and reinsert them through the original holes in the fabric, push them in to the foam where you want them and from the front without stabbing yourself or pushing them right through feel for the staple and push them open. This then makes them wide again or wider than before if required, holding the fabric to the foam again.
Gives the chance to tighten the fabric around the foam to remove the sagging as well.