I just did a evening cruise of the Washington Waterfront (cost was $22 each from Washington DC Sightseeing Cruises| Potomac River Cruises
). The problem with a sailboat in DC for Fireworks is the bridges, the Railroad Bridge (just South of the 14th street Bridge) has a clearance of about 14' and is a fixed bridge (it looks like a Bascule bridge, but decades ago the controls were hit by lightening and the resulting fire damaged beyond repair the ability to open).
From the South of that bridge you will be hard pressed to see the fireworks. Add to that, the number of power boats fighting for position and the alcohol consumed makes this the last place I would want to be in my sailboat. I have never attended the Baltimore Fireworks by boat but this would be my choice, a very good show for sure. Of course, the best place for fireworks from my point of view was the Galesville Fireworks display. But that has been dropped the last few years due to inappropriate behavior by "guests" and by the expense. One thing nice about The Bay and fireworks is that in many places you can see several shows from one spot, so consider that when planning. You should check Spinsheet
magazine for dates and times.