If using frozen spinach, omit the following cooking step. If using fresh spinach, remove the stems. Wash and place in a large pot, cover and turn the heat to medium low. Leave until wilted, about 2 to 3 minutes, turning once or twice. Place in a sieve and drain well. Press down on the spinach to remove any excess liquid.
Chop spinach and add to a bowl with the cottage cheese and feta. Lightly beat eggs and mix to combine. Season with salt, pepper and nutmeg.
Cut filo dough in four equal long rectangles and stack them on top of each other. Take the top piece, brush with butter and place 1 teaspoon filling in one corner. Fold over to form a triangle, then keep folding triangles until you get to the end. Proceed the same way with all of the filo and all of the filling.
Place the pockets close to one another on a greased baking tin and brush with butter.
Beat egg yolk with 1 to 2 tablespoons cold water and brush the pockets with it. Bake in the preheated oven until golden brown and crisp, about 25 to 30 minutes.