Preheat oven to 350°. Butter and flour a 13×9″ baking dish. Bring cocoa powder, 1 cup butter, and 1 cup water to a boil in a small saucepan; remove from heat.
Meanwhile, whisk sugar, baking soda, salt, and 2 cups flour in a medium bowl. Make a well in the center. Add eggs, buttermilk, and vanilla to well. Blend with a fork, then gradually incorporate dry ingredients. Add butter mixture and whisk until smooth. Scrape batter into prepared baking dish and smooth top.
Bake until cake starts to pull away from edges of dish and a tester inserted into the center comes out clean, 35–40 minutes. Transfer pan to a wire rack.
Frosting
Just before cake has finished baking, heat butter, milk, and cocoa powder in a medium saucepan over low heat, whisking occasionally, until butter is melted and mixture is smooth (do not let boil). Remove from heat and whisk in powdered sugar and vanilla.
Pour warm frosting over warm cake and spread out and smooth with an offset spatula. Top with pistachios and sea salt.
Serve slightly warm or room temperature.