01 - Preheat oven to 400°F and line a baking sheet with parchment paper.
02 - Heat olive oil in a skillet over medium heat. Sauté the chopped onion until softened, about 3 minutes. Add the minced garlic and cook for an additional 30 seconds.
03 - Add the spinach to the skillet. If using fresh spinach, cook until wilted; if using thawed frozen spinach, cook until just warmed through. Remove from heat and eliminate excess moisture by pressing the mixture with a spoon or using a sieve. Allow to cool slightly.
04 - Stir in the crumbled feta cheese, ground nutmeg, salt, and pepper into the spinach mixture. Mix thoroughly to combine.
05 - Unroll the puff pastry sheet onto a lightly floured surface. Evenly spread the spinach and feta filling over half of the pastry, leaving a small border.
06 - Fold the pastry in half to encase the filling. Press gently to seal. Using a sharp knife, cut into 12 strips, each approximately 3/4 inch wide.
07 - Twist each strip gently and arrange on the prepared baking sheet. Brush the twists with the beaten egg and sprinkle with seeds if desired.
08 - Transfer to the oven and bake for 18 to 20 minutes, or until the twists are golden and crisp. Allow to cool slightly before serving.