There should be some older threads either here or on another sailing forum, the 4th in NYC has been discussed at length.
The USCG does shut down the East River and other sections, typically from roughly 6PM till midnight, to all traffic. You've got to figure on being secured in place well before the closure and remaining until "dark o-clock" since you'll probably be leaving by heading north, up the East River, which has enough current
so that you're likely to want to run it only twice a day. There's no problem running it in the "dark" but you might want to do it in daylight.
The barges themselves vary positions from year to year, the Hudson or the East River or this past year, both. The main "mob guest anchorage" area is over by Ellis Island. Fouled anchors and drunks are the only real problem besides being in an open area, in the wx got really bad, you wouldn't be sleeping.
But by all means...it usually is one grand show, at least worth watching once. You could also do something radical, like tie up at Gateway Marina (Brooklyn) and take the subway into the area. Probably an hour from the marina itself (short bus then subway) into downtown, but a much cheaper quieter night's sleep. Or, take the boat into western LI sound, moor on a guest hook at a YC on City Island (also about an hour down) or out by Oyster
Bay (pretty much the same hour, but RR then subway) and you'd be leaving already clear of NYC the next day.