Preheat oven to 375 degrees F (190 degrees C). Grease a casserole dish.
Place sweet potatoes into a large pot and cover with salted water; bring to a boil. Reduce heat to medium-low and simmer until tender, about 20 minutes. Drain and mash. Measure 3 cups mashed sweet potato and transfer to a large bowl.
Beat sweet potatoes, brown sugar, 1/2 cup butter, milk, eggs, and vanilla extract together with an electric hand mixer in a bowl until smooth and creamy; pour into the prepared casserole dish.
Pour 1/3 cup melted butter over pecans in a bowl; stir to coat. Add flour; stir until combined. Sprinkle pecan mixture over sweet potato mixture.
Bake in the preheated oven until heated through and bubbling, 20 to 25 minutes.