Heat oil in a skillet over medium-low heat; cook and stir onions until tender and golden, about 30 minutes.
Place sweet potatoes in a large bowl.
Heat cream and maple syrup together in a saucepan over high heat; cook and stir until almost boiling, about 5 minutes. Pour 2/3 the cream mixture over sweet potatoes; toss to evenly coat.
Layer potatoes in a 9x13-inch casserole dish, seasoning with salt every 5 to 6 layers. Pour remaining cream mixture over potatoes until potatoes are 3/4 covered. Cover dish with aluminum foil.
Bake in the preheated oven for 30 minutes. Remove aluminum foil and gently stir potatoes; top with caramelized onions. Bake until potatoes are tender, about 20 more minutes. Allow to cool for about 30 minutes before serving.