The people that use foam underneath typically put it under a glass aquarium for insulation and so that a stick-on UTH can stick completely to the glass. The foam is used under the UTH with a little channel cut out for the thermostat probe. This keeps the probe in place against the bottom of the mat.
I have a stick-on UTH under my plastic tub and the thermostat probe sandwiched in between. It works fine. I don't see a need for foam under the tub. I did silicone foam around the back and sides to help keep ambient temps up. I have a pretty cool (65-68F) that the snakes are in, so the foam around the back and sides helps with temps. I use a CHE to boost ambient temperatures.
Oh okay. Thanks for clearing that up. I thought I was gonna have add something else to my enclosure. Lol