Preheat oven to 375. To a medium saucepan, add heavy cream, nutmeg, thyme, salt and pepper. Simmer over low heat 5 minutes, stirring occasionally then set aside.
Peel the sweet potatoes, leave the skins on the Yukon gold, then thinly slice both using a mandoline or sharp knife. It's important they're about the same thickness so they bake evenly.
Grease a shallow baking dish using the softened butter then add a layer of potatoes overlapping them. Don’t worry about alternating Yukon and sweet – as long as there’s a mixture of both, it’ll be delicious.
Top with about ⅓ of the Gruyere cheese, another layer of potatoes, another ⅓ of the cheese then pour all of the cream mixture over the top of the potatoes.
Add the remaining cheese then gently press down on the potatoes with your fingers.
Measure a sheet of aluminum foil slightly larger than your baking dish then spray the center of the underside with cooking spray to prevent cheese from sticking to the foil during baking.
Cover the potatoes and bake for 30 minutes. Uncover and continue baking another 20-25 minutes or until the potatoes are tender and golden brown on top.
Remove from the oven. Let the potatoes rest for 5 minutes then serve.