Preheat oven to 375 degrees F and butter a 9x13 inch baking dish.
Simmer heavy cream, whole milk, minced garlic, thyme, nutmeg, salt, and pepper in a saucepan.
Layer one-third of sliced potatoes in the bottom of the prepared baking dish.
Sprinkle with one-third of shredded Gruyère and Parmesan cheese.
Repeat layers twice more, finishing with remaining cheeses on top.
Pour warm seasoned cream mixture evenly over layered potatoes.
Cover dish tightly with foil and bake for forty-five minutes.
Remove foil and bake fifteen to twenty minutes until golden brown and bubbling.
Rest for fifteen minutes at room temperature before serving.