Most manufacturer's don't recommend foam under the tanks. What brand of tank do you have? I'm assuming it is glass.
Edit: To make it easier, if you have trim that goes around the tank you don't need foam. Foam is for all glass or acrylic tanks that the bottom pane rests on the stand. It is used to distribute the weight of the tank evenly onto an uneven surface. The plastic trim on most glass tanks serves the same purpose and foam will not benefit you.