Preheat the oven to 350°F. Lightly grease an 8-inch square baking dish.
Combine the heavy cream, milk, salt, and pepper in a medium saucepan over medium-high heat and bring to a simmer. Meanwhile, stir together the cheese and thyme in a small bowl.
Arrange one layer of sweet potatoes over the bottom of the prepared baking dish. Sprinkle some of the cheese over the top, then add some of the warm milk mixture. Continue the layering process four or five more times.
Stir together the pecans, brown sugar, flour, cinnamon, and nutmeg in a small bowl to combine. Add the melted butter and stir until the mixture comes together. Sprinkle the streusel evenly over the potatoes. Bake for about 1 hour, until the potatoes are tender and the top is golden brown and bubbly. Remove from the oven and let rest for 15 minutes before serving.