It depends on the nature of the foam
"open cell" foam means that the air-filled areas will interconnect and not be completely sealed off by plastic. This allows water, air or any other fluid to migrate through the material.
"closed cell" means that the voids are separate, distinct and don't allow direct communication with ea. other - hence moving any fluid through the foam is very difficult.