Preheat your oven to 400°F (200°C).
Roll out the thawed puff pastry on a lightly floured surface.
Cut the pastry into squares, about 3x3 inches in size.
Spoon a small amount of pizza sauce onto the center of each square.
Sprinkle shredded mozzarella cheese over the sauce and add pepperoni slices, if using.
Fold the corners of the pastry squares over the filling to create a pocket and seal the edges with a fork.
Brush the tops of the pastry with beaten egg for a golden finish.
Place the prepared bites on a baking sheet lined with parchment paper.
Bake in the oven for about 15-20 minutes, or until golden brown and puffed up.
Once baked, remove from the oven and let cool slightly before serving.