Preheat oven to 300℉. Butter a medium gratin dish or cast iron skillet. Arrange one layer of potatoes in the bottom, then sprinkle with some of the thyme and salt and pepper. Drizzle with a little of the cream. Add a layer of sweet potatoes, more thyme, salt pepper, and cream. Continue to layer, finishing with a layer of sweet potatoes, thyme, salt, pepper, and cream.
Bake for 1 hour to 1 hour 15 minutes, until the potatoes are tender when pierced with a fork. If the gratin is browning too much, cover in aluminum foil.