Preheat oven to 375 degrees F. Place a rack in the center of the oven.
Mix the cheeses, sugar and scented waters. Set aside.
Unwrap the dough and use your fingers to separate the strands, leaving no clumps. This will take some time. Pour butter over the dough and toss well to coat evenly.
Place half the dough in a 12-by-18-inch sheet pan, distributing it evenly and pressing it flat. Spoon the cheese in mounds over the surface of the dough and gently spread flat, not quite to the edges.
Distribute the remaining dough over the cheese to cover it completely. Tuck the edges down inside the rim of the pan. Bake for about 1 hour, until light golden brown all over. (It may take more or less time, depending on oven.) Remove and cool slightly.
While the kanafeh bakes, make the syrup by combining water and sugar in a saucepan and heating to melt the sugar. Once simmering, add the remaining ingredients and cook 20 minutes to reduce. Remove from the heat to cool. Strain.
Cut the kanafeh into portions and place them on serving plates. Drizzle some syrup over the top as desired and sprinkle with pistachios. Serve warm.
Leftover kanafeh can be refrigerated and reheated in oven for serving.