Preheat your oven to 400°F (200°C).
In a large mixing bowl, combine the feta cheese and ricotta cheese, breaking up the feta into smaller pieces.
Add the egg and mix until thoroughly combined. Fold in fresh dill if using.
Roll out the puff pastry on a lightly floured surface to about 1/8 inch thick.
Lay one sheet of puff pastry on a parchment-lined baking sheet, spoon the cheese filling onto the center, and cover with another sheet of puff pastry, sealing the edges.
Brush the top with the beaten egg and sprinkle sesame seeds if desired.
Bake for 25-30 minutes, until the pastry is puffed and golden brown.
Let it cool for a few minutes before slicing and serving warm or at room temperature.