Preheat the oven to 375, then in a medium saucepan, add the heavy cream, nutmeg, thyme, salt and pepper. Simmer over low heat 5 minutes, stirring occasionally.
Peel the sweet potatoes, leave the skins on the Yukon gold, then thinly slice both, trying to get them about the same thickness.
Use the tablespoon of butter and generously butter your baking dish then add the first layer of potatoes, overlapping them.
Top with about ⅓ of the Gruyere cheese, another layer of potatoes, topped with another ⅓ of the cheese then pour all of the cream mixture over the top of the potatoes. Top with the remaining cheese then using a spatula gently press down on the potatoes.
Measure a sheet of aluminum foil slightly larger than your baking dish the spray the center of the underside with cooking spray. This prevents the cheese from sticking to the foil during the baking process.
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.