Preheat the oven to 400°F. Prick each sweet potato in several spots with a fork and place on a rimmed baking sheet. Bake until tender when pierced with a knife, 35–45 minutes. Transfer to a wire rack and let cool to room temperature, then peel and slice thickly. Reduce the oven temperature to 375°F.
Butter a 9-inch square baking dish. Arrange the sweet potato slices in the dish, overlapping them. In a small saucepan over medium heat, combine the butter, chile, sugar, and cream and heat, stirring, until blended. Pour evenly over the potatoes. Sprinkle the gratin with salt and pepper. (You can assemble the gratin to this point up to 1 day in advance and store it, tightly covered with plastic wrap, in the refrigerator. Increase the baking time to about 30 minutes.)
Bake the gratin until heated through, about 15 minutes. Serve right away.