Preheat oven to 350°F (175°C). Grease an 18x13-inch sheet pan and lightly dust with flour if needed.
In a medium saucepan, combine water, butter, and cocoa powder. Heat over medium heat until butter melts and mixture reaches a gentle boil. Remove from heat.
In a large bowl, whisk together flour, sugar, baking soda, and salt.
In a separate bowl, whisk sour cream, eggs, and vanilla until smooth.
Add the sour cream mixture to the dry ingredients and stir gently. Slowly pour in the hot cocoa mixture and mix until smooth.
Pour batter into the prepared pan and spread evenly.
Bake for 15 to 20 minutes, or until a toothpick inserted in the center comes out with a few moist crumbs.
While the cake bakes, prepare the frosting by heating milk, cocoa powder, and butter in a saucepan until melted and lightly boiling.
Remove frosting mixture from heat and whisk in powdered sugar until smooth. Use a hand mixer if needed for a silky texture.
Immediately pour warm frosting over the hot cake and spread quickly with a spatula.
Sprinkle chopped pecans on top if desired. Let the cake rest for 10 to 15 minutes before slicing and serving.