Preheat your oven to 400°F and have a 9-by-13-inch casserole or baking dish ready.
Place the sweet potatoes in a large stockpot with enough water to cover them plus two inches. Add a pinch of sea salt to the water and bring the pot to a boil over medium-high heat. Reduce the heat to medium-low and simmer for about 15 minutes, or until the sweet potatoes are fork-tender.
While the sweet potatoes are cooking, prepare the filling. Heat the oil in a large sauté pan or cast-iron pan over medium-high heat. Add the onion and cook for about 5 minutes, until it has softened and begun to brown slightly.
Add the garlic, carrots, and mushrooms to the pan and continue to cook, stirring frequently, for about 10 minutes, or until the vegetables have softened.
Mix in the lentils, diced tomatoes, tomato paste, and thyme. Remove the pan from the heat and pour the mixture into the 9-by-13-inch casserole dish.
Drain the sweet potatoes and then return them to the pot. Use a potato masher or large fork to mash the vegetables. Add the Homemade Vegetable Stock and mash a little more. Season with sea salt and black pepper to taste.
Carefully spread the mashed sweet potatoes over the top of the lentil mixture. Bake for about 15 minutes, or until the sweet potato crust has browned slightly and the filling is bubbly.