Low-density foam layers may be utilized in inertial fusion targets for smoothing of transverse inhomogeneities in ablation pressure. Alternatively, transparent underdense foam may serve as a dynamic phase plate for spatiotemporal smoothing of inhomogeneity patterns inside laser beams. We present here results of one- and two-dimensional fluid simulations of laser interactions with foams. For foams with submicron pores and wall thicknesses of order 10 nm, laser tunneling through overdense ionized walls is observed and laser penetration into the foam is accelerated. Qualitative comparison with recent experimental results is performed.