Depends. The foam should be compatible with whatever waterproofing system is going over it. Some of the waterproofing coatings smell an awful lot like polyester resin, which can dissolve some plastics (expanded polystyrene would melt before your eyes).