So the foam is acting as insulation? Heat escapes upward, so if you have a screen top, covering the majority of that will be the best way to keep heat/humidity in. The old tried and true under the tank heater with a thermostat to regulate temperature with some substrate like aspen works fine for heating the snake. I doubt you'd need any kind of insulation. I've used a piece of acrylic over the screen to help keep humidity in the tank, but eventually discovered that tubs are really the best way to go for the general husbandry.
Good luck!
Jim