The No. 4 seeded pair, who collected titles in Indian Wells and Miami earlier this season, defeated Azarenka-Barty 7-5, 7-5 to clinch their first Grand Slam doubles title.
"I think from the start of the season, start of the year actually, well, we were, like, 'We're going to play together'," the WTA website quoted Mertens as saying in their champions' press conference.
"We didn't think we would achieve this big thing. Really happy about it and I think we are growing as two doubles players playing together."
Earlier, Britain's Jamie Murray won a US Open title for the fourth successive year with a straight-sets triumph in the mixed doubles alongside American Bethanie Mattek-Sands.
The pair defended their title with a 6-2, 6-3 win over top seeds Chan Hao-ching and Michael Venus at the Flushing Meadows.