Heat the oven to 375°F and grease a 2-quart baking dish. Melt the 2 tablespoons butter in a skillet and cook the washed, drained leeks over medium heat for 8 minutes until soft.
Warm cream, milk, salt, pepper and thyme in a saucepan just until steaming. Keep below a boil.
Layer half the sweet potato slices in the dish, add half the leeks and goat cheese, then repeat. Pour the warm cream mixture evenly over the layers.
Cover tightly with foil and bake for 45 minutes. Uncover, scatter with Parmesan and bake for 20 to 25 minutes more until browned and easily pierced through the center.
Rest for 15 minutes so the sauce settles between the layers, then serve with a wide spoon or spatula.