Foam isnt really weight bearing. as a single floating layer. I've set mine on 1/2" birch ply, and its supported by Z shaped supports of a 1x5 with a 1x2 glued and nailed to the edge at either end to enable attachment to both surfaces.
Along the back, the track sits on the same thickness plywood, but the base is 5" of foam sitting on the table frame.