Preheat your oven to 375°F (190°C) and line a baking sheet with parchment paper if desired.
In a skillet over medium heat, add 2 tablespoons of olive oil. Once hot, add the chopped onion and sauté until translucent, about 5 minutes. Add the minced garlic and cook for another minute until fragrant.
Stir in the chopped spinach and cook until wilted, about 4-5 minutes. Remove from heat and let cool slightly.
In a mixing bowl, combine the cooked spinach mixture with crumbled feta cheese, salt, pepper, and nutmeg (if using). Mix well until combined.
Take one sheet of phyllo dough and brush with olive oil. Layer another sheet on top and brush again with oil. Repeat this step until you have 4-5 layers.
Place a generous tablespoon of the spinach and feta filling at one end of the layered phyllo. Fold the sides over the filling and roll it up tightly into a log shape.
Place the rolled börek on the prepared baking sheet and brush the top with the beaten egg for a golden finish.
Repeat steps 5-7 with the remaining phyllo and filling.
Bake in the preheated oven for 20-25 minutes, or until golden brown and crispy.
Remove from the oven and let cool slightly before slicing into pieces. Serve warm or at room temperature.