It's common for egg muffin recipes like this one to deflate a bit. When they are baked, the air bubbles in the egg expand, and they deflate as they cool. One way to reduce this effect is to let the muffins cool more slowly, so keep them in the pan to cool before removing them. This will help, but know that it's totally normal and fine for egg muffins to collapse a bit.