Preheat the oven to 375°F (190°C).
Peel and thinly slice the sweet potatoes using a mandoline or sharp knife, making sure to keep the slices even.
In a large mixing bowl, whisk together the heavy cream, whole milk, minced garlic, salt, black pepper, and nutmeg until well combined.
Layer half of the sweet potato slices in the bottom of the greased baking dish. Pour half of the cream mixture over the top, then sprinkle with half of the Gruyère cheese.
Repeat the layers with the remaining sweet potatoes, cream mixture, and Gruyère cheese.
Top with the grated Parmesan cheese and breadcrumbs (if using) for added texture.
Dot the top with small pieces of butter to encourage browning.
Cover the dish with aluminum foil and bake for 30 minutes. Remove the foil and bake for an additional 15 minutes, or until the top is golden and bubbly.
Allow the gratin to rest for about 10 minutes before serving.