Preheat oven to 425ºF. Mix sliced sweet potatoes with oil, maple syrup, ½ teaspoon salt and ¼ teaspoon pepper. Arrange on large rimmed baking sheet (sheet pan). Roast for 25 minutes.
Meanwhile, fry bacon in a large skillet over medium-high heat until almost crisp. With a slotted spoon, remove bacon from pan and set aside on a paper towel-lined plate.
Reduce heat to medium, add sliced shallot, ½ teaspoon salt and ¼ teaspoon pepper to bacon drippings and cook until tender. Stir in flour, cooking and stirring about 1 minute. Add milk, cream, thyme and nutmeg slowly while whisking, increase heat to medium, and cook until mixture thickens slightly, about 5 minutes. Remove from heat and stir in all but ½ cup of the Gruyère cheese.
Arrange half of sweet potatoes in greased 9x13 inch baking dish. Cover with half of the sauce and sprinkle with half the bacon.
Arrange remaining sweet potatoes on top, cover with remaining sauce, and sprinkle with remaining ½ cup cheese and bacon.
Bake at 325ºF for 20 minutes; serve immediately.
Video
Notes
Make Ahead Ideas: Peel and slice the sweet potatoes up to a day ahead and store in a covered container, completely submerged in water. Drain well and pat dry before using. Sweet potatoes can be roasted up to a day ahead, if you prefer. Roast as directed, cool, and refrigerate. Proceed with recipe as directed when ready to use.
For a vegetarian option, omit the bacon. Use a tablespoon of olive oil to cook the chopped shallots.
Sweet potatoes can be left unpeeled, if you prefer.