Preheat the oven to 400°F (200°C).
Roll out the puff pastry on a lightly floured surface into a larger rectangle.
Cut the pastry into squares, approximately 3 inches by 3 inches.
Place a square of puff pastry on a lined baking sheet.
Add a spoonful of marinara sauce to the center of each pastry square.
Sprinkle mozzarella cheese, pepperoni, and Parmesan on top of the sauce.
Fold the corners of the puff pastry squares inward to create a pocket or seal.
Brush the top of each pastry pocket with the beaten egg.
Bake in the preheated oven for 15-20 minutes, or until golden brown.
Remove from the oven and let cool slightly before serving.