01 - Preheat oven to 400°F and line a baking tray with parchment paper.
02 - Heat olive oil in a skillet over medium heat. Add chopped onion and sauté until softened, about 3 minutes. Stir in minced garlic and cook for 30 seconds.
03 - Add spinach and cook until wilted if fresh, or until heated through if using thawed spinach. Remove excess moisture by pressing the mixture with a spoon or draining in a sieve. Let cool slightly.
04 - Combine cooled spinach mixture with crumbled feta, ground nutmeg, salt, and pepper in a bowl. Mix thoroughly.
05 - Unroll the puff pastry sheet on a lightly floured work surface. Evenly spread the spinach-feta filling over half of the pastry, leaving a small unfilled border.
06 - Fold pastry over to encase filling. Press edges gently. Using a sharp knife, slice into 12 strips, each about 3/4 inch wide.
07 - Gently twist each strip several times and lay on prepared baking tray. Brush with beaten egg and sprinkle with seeds if desired.
08 - Bake for 18 to 20 minutes or until puffed, golden, and crisp. Let cool slightly on tray before serving.