Heat the oven to 350°F, butter a 13-by-18-inch rimmed sheet pan and dust it lightly with flour.
Whisk the flour, granulated sugar, baking soda and salt together in a large bowl.
Bring 1/2 cup butter, 1/4 cup cocoa and water just to a boil in a saucepan, then pour the hot mixture over the dry ingredients and whisk until combined.
Whisk in the buttermilk, eggs and 1 teaspoon vanilla until the batter is smooth, then spread it evenly in the pan.
Bake for 18 to 22 minutes until the center springs back lightly and a tester shows moist crumbs rather than wet batter.
Melt the remaining 1/2 cup butter with the milk and remaining cocoa, remove from the heat and whisk in the confectioners' sugar and remaining vanilla until smooth.
Pour the warm icing over the warm cake, spread it to the edges and cool for at least 45 minutes before cutting.