Preheat the oven to 375°F (190°C). Lightly grease a medium baking dish with a bit of butter or oil.
Wash and dry the sweet potatoes. Slice them into thin rounds, about 1/8 inch thick. The thinner you slice, the quicker they cook and the more tender the dish will be.
In a small bowl, whisk together the heavy cream, milk, melted butter, rosemary, thyme, garlic powder (if using), and a pinch of salt and pepper. Taste briefly—the dairy and herbs will carry the seasoning, so you want it balanced but not salty.
Layer half of the sweet potato slices in the prepared dish, overlapping slightly like tiles. Pour over a third of the cream mixture. Sprinkle half of the cheddar and a light dusting of parmesan.
Repeat with a second layer of potatoes, pour another third of the cream, and add the remaining cheese. Finish with a final layer of potatoes, the rest of the cream, and the remaining parmesan on top.
Cover the dish tightly with foil and bake for 25 minutes. Remove the foil, bake for another 25–30 minutes, until the potatoes are tender when pierced with a knife and the top is lightly browned. If the top isn’t browning as you’d like, run the dish under the broiler for 1–2 minutes, watching closely to prevent burning.
Let the dish rest for 5–10 minutes before serving. This helps the sauce thicken a touch and makes it easier to scoop.