Heat oven to 375°F. On a lightly floured surface, roll puff pastry into a 10-inch-by-14-inch rectangle. Transfer to a baking sheet. The pastry should extend up the sheet’s rim slightly to create an outer crust; press it into place. Place foil over the pastry; cover with dried beans, rice, or pie weights (to weigh dough down); and place in oven. Bake 20 minutes, then remove weights and foil and bake until golden and puffy, about 5 minutes. Let cool.
Heat cream, garlic, bay leaves, and salt in a small saucepan over medium heat until gently simmering, 3 to 5 minutes. Reduce heat, and simmer gently for 5 more minutes. Remove from heat and cool.
Meanwhile, heat oil over medium-high heat. Sear mushrooms in batches, stirring occasionally, until tender and golden brown, 5 to 7 minutes. Toss with thyme leaves, and season with salt and pepper.
Whisk egg and additional yolk into cooled cream mixture. Scatter Gruyère evenly over the parbaked pastry. Pour cream mixture over cheese, then scatter mushrooms decoratively on top.
Bake until filling is set, about 15 minutes. Cool slightly before serving.