"Because of the improvement of the water quality, algae and zooplankton have multiplied, giving good food for the menhaden [a small fish consumed by humpbacks], which have returned in numbers that the fishermen say they have not seen in their lifetimes," Paul L. Sieswerda, president of Gotham Whale, told Popular Science. The enforcement of catch limits for industrial fishing has also helped restore balance to the ecosystem.
Sieswerda has been tracking whales in the waters around New York City for Gotham Whale since 2011 when whales started to be seen more consistently. While humpback whales are still a protected species, their numbers are growing. In 2016, it was taken off the endangered species list, where it had been since 1970.
Legislation has played a significant role in getting the waters to this point. From the Marine Mammal Protection Act to 1970's Environmental Conservation Law, which created New York's Department of Environmental Conservation, there are many pieces of legislation that aided in protecting New York's waterways. (Including the Environmental Protection Agency, the Federal Clean Water Act in 1972, et al.)