JMHO, I would be cautious of using staples ... They rust ...

... I believe the more traditional method is copper tacks ... which I’ve used on my artist canvas for many years ...
Although that edge method may seem workable , think we’d prefer having a good coat of adhesive (primer/T2) On the foam , under the fabric.. not depending what we could push through the canvas... Applying canvas over wood is slightly different as the wood has a better Grip with the adhesive , with the surface of the wood having a Gazillion tiny strong fibers to grab the glue , a foam surface is merely some tiny surface bubbles filled with AIR

... I painted on my T2 ,laid the canvas over that , stretched it , then repeated the process till the panel was finished ... then trimmed the edges and glued them down ... For better stretching at stubborn spots , I kept a spray bottle of water handy for dampening the canvas... Also used a handful of blow gun darts as large pins for securing wayward canvas till the glue grabbed. As everything dried it tightened up even more .... You have to remember that glue and even paint is a good % of Water... as the water evaporates , the glue/paint loses volume (size) and therefore naturally SHRINKS ...
