Position a rack in the center of the oven, and heat the oven to 350 degrees F.
Remove the dough from the refrigerator and divide it in half. Press each half into a rectangle. On a lightly floured surface, roll out each half into a 14-by-11-inch rectangle. Using a paring knife, lightly score 1 rectangle into eight 31/2-by-51/2-inch rectangles (about the size of an index card).
Brush the top surface of the entire scored rectangle with the egg. Spoon 2 tablespoons of the jam in a mound in the center of each scored rectangle. Lay the second large dough rectangle directly on top of the first. Using fingertips, carefully press down all around each jam mound, so the pastry sheets adhere to each other.
Using a knife, a pizza roller (easier), or a fluted roller (easier and prettier), and following the scored lines, cut the layered dough into 8 rectangles. Place the rectangles, well spaced, on a baking sheet.
Bake for 40 to 45 minutes, or until the tops of the pastries are evenly golden brown. Let cool on the baking sheet on a wire rack for about 30 minutes.
While the pastries are cooling, in a small bowl, whisk together the confectioners’ sugar, vanilla, and enough of the water to make a smooth, pourable glaze. You should have about 1/2 cup. (The glaze can be made ahead and stored in an airtight container at room temperature for up to 1 week.)
When the pastries have cooled for 30 minutes, brush the tops evenly with the glaze, then sprinkle with the rainbow sprinkles (if using). Let stand for 10 to 15 minutes to allow the glaze to set before serving.
The pastries can be stored in an airtight container at room temperature for up to 2 days.
Pop-Tarts is a registered trademark of Kellogg, Inc.