1) Your oil may have detergents or fillers that cause foaming.
2) There is still some water inside the crankcase.
3) There is a crack in the body of the pump that may be leaking into the crankcase.
4) The diaphragms were installed incorrectly. (sorry)
Such is the joy of diaphragm pumps....