For many polymeric foams, a solidified foam is formed by polymerizing and foaming a liquid polymer mixture and then allowing that foam to solidify.  Thus, liquid foam aging effects do occur before solidification. In the liquid foam, gravitational forces and internal pressures cause a flow of the liquid toward the bottom of the foam.  This causes some of the foam cells to form into irregular polyhedra as liquid drains, which are less stable structures than the spherical structures of a traditional foam.  These structures can however be stabilized by the presence of a surfactant.
The foam structure before solidification is an inherently unstable one, as the voids present greatly increase the surface free energy of the structure.  In some synthetic biofoams, a surfactant can be used in order to lower the surface free energy of the foam and therefore stabilize the foam.  In some natural biofoams, proteins can act as the surfactants for the foams to form and stabilize.