Foam comes from soap residue on your skin and in your suits. There are also surfactants in other products that we wear that will contribute. Another cause can be not thoroughly rinsing your filters after using a filter cleaning product.
Foam won't hurt anything. I recommend scooping out as much as you can, then use a foam eliminator product. With foam eliminator, you don't need a lot. I recommend putting it in an empty spray bottle. A light mist will do the trick. Additionally, raising your calcium hardness can help, though you open up another can of worms with that.