01 - Set oven to 400°F.
02 - Place sweet potatoes into a large pot of salted water. Bring to a boil, then reduce heat and simmer until tender, approximately 15 to 20 minutes.
03 - Drain sweet potatoes thoroughly, then mash with butter and milk until smooth. Season with salt and freshly ground black pepper. Set aside.
04 - Heat olive oil in a large skillet over medium heat. Add onion, garlic, carrots, and celery, cooking until softened, about 5 to 7 minutes.
05 - Add lentils, tomato paste, soy sauce, thyme, rosemary, bay leaf, and vegetable broth to the skillet. Bring to a simmer, cover, and cook for 25 to 30 minutes, stirring occasionally, until lentils are tender and liquid mostly absorbed.
06 - Remove bay leaf. Stir in frozen peas and season with salt and freshly ground black pepper to taste.
07 - Transfer lentil mixture to an 8 by 8-inch baking dish. Evenly spread sweet potato mash over the top.
08 - Place dish in oven and bake for 20 minutes, until the surface is lightly golden.
09 - Allow to cool for 5 minutes before serving.