01 - Preheat oven to 375°F. Butter a 9 x 13-inch baking dish thoroughly.
02 - In a saucepan over medium heat, combine heavy cream, whole milk, minced garlic, thyme leaves, salt, pepper, and nutmeg if using. Warm gently until steaming; remove from heat.
03 - Arrange half of the sliced potatoes evenly in the prepared baking dish. Sprinkle with half the Gruyère and Parmesan cheeses.
04 - Pour half of the warm cream mixture over the layered potatoes and cheese.
05 - Add remaining sliced potatoes over the first layer, then top with the remaining Gruyère and Parmesan cheeses.
06 - Pour the remaining cream mixture evenly over the top. Dot the surface with unsalted butter.
07 - Cover the dish with aluminum foil and bake for 40 minutes.
08 - Remove the foil and bake an additional 20 minutes, or until the top turns golden brown and potatoes are tender.
09 - Allow gratin to rest for 10 minutes before serving. Garnish with fresh thyme leaves.