01 - Preheat oven to 400°F. Line a large baking sheet with parchment paper.
02 - In a large bowl, combine sweet potatoes and apples.
03 - In a separate small bowl, whisk together maple syrup, melted butter, cinnamon, nutmeg, salt, and pepper.
04 - Pour the glaze over the sweet potatoes and apples. Toss until evenly coated.
05 - Spread the mixture in a single layer on the prepared baking sheet.
06 - Roast for 35-40 minutes, stirring halfway through, until sweet potatoes are tender and edges are caramelized.
07 - If using nuts, sprinkle chopped pecans or walnuts during the last 5 minutes of roasting.
08 - Transfer to a serving dish, garnish with fresh thyme if using, and serve warm.