Bake sweet potatoes.
Cook lentils in the instant pot or other.
Transfer potatoes to a large mixing bowl. Use a masher or fork to mash until smooth. Season with salt and pepper to taste. Depending on the sweetness of sweet potatoes, add a bit of maple syrup to taste (optional). Loosely cover and set aside.
Preheat oven to 425 degrees F (220 C) and line a 9×13-inch (or similar size) baking dish with parchment paper.
Next heat a large pot over medium heat. Once hot, add water, onions, and garlic and sauté until caramelized – about 4-5 minutes.
Add a pinch each salt and pepper. Then add vegetables, vegetable broth, and thyme and stir. Throw in pecans. Cook just until veggies and pecans are still crisp, and then mix in lentils.
Taste and adjust flavor as needed, adding more salt and pepper for overall flavor.
Transfer the lentil mixture to your baking dish and top with mashed sweet potatoes. Smooth down.
Bake for 20 minutes or until the potatoes are lightly browned on top and the edges are bubbling.
Let cool briefly before serving. The longer it sits, the more it will thicken. Enjoy!