Found this hard, foam-like brown structure attached to a fence post in the backyard. I was about to scrape it off but hesitated. What is it?

garden.
7. When They Hatch: The Best Time of Year and What You’ll See
Praying mantis eggs typically hatch in the spring when temperatures rise consistently. This timing ensures that the young mantises have access to abundant food sources, such as aphids and other small insects, which are also emerging in the warmer weather.
When the mantises hatch, you’ll observe tiny, almost translucent insects climbing out of the egg case. They quickly disperse into the surrounding vegetation, where they begin their role as natural pest controllers. This hatching event is a remarkable testament to the cycle of life and the interconnectedness of all living things in your backyard ecosystem.
8. How to Relocate an Egg Case Without Harming It
If you find a praying mantis egg case in an area where it might be disturbed or damaged, you can carefully relocate it to a safer spot. Choose a location that