Melt butter in the microwave. Use the butter to grease a large lasagna pan. The pan should be the same width, or length, as the fillo dough.
Begin by folding one sheet of dough at a time, back and forth, like an accordion, and add to the pan.
Repeat this step with the remaining sheets. When you’re done, the pan should be completely covered by the fillo dough. If not, space the dough out until the pan is covered entirely.
Pour the remaining butter over the sheets and bake for 15 minutes.
Meanwhile, whisk the eggs in a medium-sized bowl. Mix in the milk, sugar, vanilla, and rosewater and whisk to combine. Set aside until needed.
After 15 minutes have elapsed, pour the egg mixtures over the fillo dough, making sure it is evenly distributed.
Place back in the oven for 35 more minutes, or until the custard is set and dough is golden brown.
Meanwhile, mix chopped pistachios, cardamom, and sugar in a small bowl and grind in a food processor into a fine texture. Remove pan from the oven and sprinkle with the nuts. Allow to cool before slicing into squares or triangles.