Preheat your oven to 375°F (190°C).
In a mixing bowl, combine the heavy cream, milk, minced garlic, salt, black pepper, and ground nutmeg. Whisk until well combined.
In the prepared baking dish, drizzle olive oil on the bottom to prevent sticking.
Arrange half of the sliced sweet potatoes in an even layer on the bottom of the dish.
Pour half of the cream mixture over the sweet potatoes, followed by half of the Gruyere cheese.
Repeat the layers with the remaining sweet potatoes, cream mixture, and Gruyere cheese.
Top the final layer with grated Parmesan cheese for a crispy topping.
Cover the baking dish with aluminum foil and bake in the preheated oven for 30 minutes.
Remove the foil and bake for an additional 15 minutes, or until the top is golden brown and the sweet potatoes are tender.
Allow to cool for a few minutes before serving.