Preheat oven to 375 degrees.
Place sweet potatoes in a pan and cover with water. Place lid on pan and bring water to a boil. Reduce to a simmer and cook potatoes until cooked through, about 15 minutes. Drain and return potatoes to pan.
Add the butter, milk, maple syrup, cinnamon, nutmeg, salt, and vanilla and mash the sweet potatoes using a potato masher.
Spoon the sweet potatoes into a 11 x 7 inch pan that is coated with butter or non-stick spray.
Sprinkle the pecans on top of the sweet potatoes.
Bake at 375 degrees for 25 minutes.