Islamic Interpretation of Dreams (Ibn-i Sirin):

(Anger; Froth; Suds; Water scum) In a dream, foam or water scum represents something worthless. However, water scum may create initial wonderment in the mind or perhaps be of value.

If one accumulates or collects some foamy substance in his dream, it means that he has gathered something worthless, the efforts needed to collect and preserve it could be lost time.