The purpose of a praying mantis cocoon is to protect the eggs the female deposits after mating. Female praying mantises deposit from 10 to 400 eggs, depending on the species. As the eggs are laid, a white foam covers them and hardens to form the protective cocoon.
Praying mantises go through stages of growth much like other insects. During the egg stage, the cocoon protects them. During the nymph stage, they very closely resemble adults but do not have genitalia or wings until adulthood is reached. The lifespan of a praying mantis is normally 10 to 12 months in a warm climate. In cold climates, females die in the winter months.