In a large bowl, whisk together the powdered sugar and meringue powder until well combined.
Gradually add the warm water, mixing on low speed with an electric mixer until just combined. Add vanilla extract if using.
Increase the mixer speed to medium-high and beat for 5-7 minutes, or until the icing is smooth, thick, and has stiff peaks.
If the icing is too thick, add a teaspoon of water at a time until the desired consistency is reached. If too thin, add a tablespoon of powdered sugar at a time.
Transfer to a piping bag fitted with a tip, or use a spatula for spreading.
Decorate cookies and cakes as desired. Allow to dry completely, which can take several hours depending on thickness and humidity.
Notes
For different consistencies, adjust the amount of water or powdered sugar. For flood icing, thin with a little water. For piping details, keep it thick. Store leftover icing in an airtight container at room temperature.