01 - Preheat the oven to 400°F. Line a baking sheet with parchment paper.
02 - Heat olive oil in a skillet over medium heat. Add diced onion and minced garlic and sauté until softened and translucent, about 3 minutes.
03 - Add spinach to the skillet and cook until wilted or until liquid from frozen spinach evaporates. Remove from heat and allow to cool slightly.
04 - In a large mixing bowl, combine the cooked spinach mixture with crumbled feta, beaten egg, chopped dill, ground nutmeg, salt, and black pepper. Mix thoroughly.
05 - Roll out the puff pastry on a lightly floured surface. Cut the sheet into 8 equal squares.
06 - Place a heaping tablespoon of filling onto the center of each square. Fold each square into a triangle or rectangle, pressing edges firmly to seal. Crimp edges with a fork to secure.
07 - Transfer pastries to the prepared baking sheet. Brush the tops with the beaten egg and sprinkle with sesame seeds if desired.
08 - Bake for 20 to 25 minutes, or until pastries are puffed and golden brown.
09 - Allow pastries to cool slightly before serving.