Defrost the puff pastry according to package instructions — typically in the fridge for a couple of hours.
Preheat oven to 400°F with a rack in the center. Spray a 24-cup mini muffin tin with nonstick cooking spray.
Trim the root end and the dark green leaves from the leeks and discard. Slice the remaining white and light green parts in half lengthwise and then cut crosswise into thin half-moons. Place in a colander and rinse thoroughly, being sure to remove any sand and grit. Shake off any excess water.
Melt the butter in a 10-inch nonstick frying pan over medium heat.
Add leeks, salt, pepper, and thyme.
Cook, stirring from time to time to prevent browning, until tender and reduced in volume by half, 5-10 minutes.
Stir in cream and nutmeg and continue to cook until cream is thick enough to coat leeks without leaving liquid in the pan, about five minutes more.
Remove from heat and stir in feta.
Unfold the puff pastry on a lightly floured surface and flour the top, too.
Roll it out gently with a rolling pin until it grows by 2-3 inches horizontally and vertically.
Cut it into quarters, and then cut each quarter into six equal rectangles. Tuck each rectangle in to a mini muffin cup.
Spoon a small amount of leek filling into each prepared muffin cup, dividing evenly.
In a small bowl, beat egg and water together with a fork to make an egg wash.
Brush each pastry cup (including filling) with a little bit of egg wash.
Bake for 20 minutes, until pastry is nicely browned. Serve warm.