Preheat the oven to 400°F (200°C). Place the sweet potatoes on a lined baking sheet, prick them several times with a fork, rub with a little olive oil, and roast for 45–50 minutes, or until very tender.
Near the end of the roasting time, heat the remaining olive oil in a large skillet over medium heat. Add the diced onion and cook for 3–4 minutes until softened and translucent.
Stir in the garlic and sliced mushrooms, cooking for 5–7 minutes until the mushrooms release their juices and begin to brown.
Add the baby spinach to the skillet and cook just until wilted, about 1–2 minutes, stirring frequently.
Reduce the heat to low, then mix in the cream cheese and milk, stirring until the mixture becomes smooth and creamy. Season with lemon juice, thyme, salt, and pepper to taste.
Remove the roasted sweet potatoes from the oven and let them cool just enough to handle. Slice each one open lengthwise and gently fluff the inside with a fork to create space for the filling.
Spoon the creamy mushroom and spinach mixture evenly into each sweet potato. Top with Parmesan or nutritional yeast if using, and serve hot as a main dish.