Woke up to find this bright yellow, frothy patch on my mulch. It appeared overnight and looks like expanding foam. Any ideas?

appear.
8. When You Should Leave Slime Mold Alone—and Why 
In most cases, it’s perfectly fine to leave dog vomit slime mold alone. It will naturally dry up and disappear as conditions change, often within a few days. By allowing it to complete its life cycle, you’re contributing to the natural decomposition process and nutrient cycling in your garden.
Leaving slime mold undisturbed also encourages biodiversity, as it provides a food source for certain insects and other microorganisms. Unless its presence is particularly bothersome to you, letting it be is