Option 1: If you have mashed the sweet potatoes ahead of time, pull them out of the refrigerator and put them in a medium sized bowl. In a medium saucepan, melt butter and sugar together for bottom layer. Then, add butter and sugar and vanilla to the mashed sweet potatoes and mix well.
Option 2: If you are making the sweet potatoes on the same day as you are baking the casserole, simply add the butter and sugar and vanilla in as you mash the sweet potatoes in a medium sized bowl.
Spread bottom layer into a greased 9×13 pan.
Top Layer
In a medium saucepan, melt butter with the brown sugar and flour. Cook until thick (happens quickly, so be aware!).
Spread top layer gently over the bottom layer and add chopped pecans if desired.
Bake at 425° for 25 minutes until top layer forms a nice crust.
Notes
This dish freezes well, so feel free to make it up ahead of time and pull it out in time to reheat for the festivities!