How to get sponge type material
I would use a much simpler setup:



Math > Round to make texture black and white and Math > Multiply to control Volume Density.

You can use different textures to get different results, I've made examples above with Noise, Voronoi and Wave.

As always with Volume Shaders don't forget to crank up Ligth Paths > Volume to something more than 0.