Mr. de Blasio said he was able to captain the blackout response even 1,000 miles away in Waterloo, Iowa, saying that the situation was “handled quickly” by those on the ground and that the power was back on in about five hours.

“When you’re a mayor or governor, you’re going to travel for variety of reasons,” said Mr. de Blasio on CNN’s “State of the Union.” “The important thing is to have the hand on the wheel, make sure things are moving effectively, and communicate to people.”

He added, “Even from where I was, I was able to do that right away with the people in New York City. So in the end, a CEO, a public sector or private sector, has to be able to lead wherever they were, and we got this done.”

Still, Mr. de Blasio, a long-shot candidate for the 2020 Democratic presidential nomination, took a pounding on social media.

“Mayors are important. And situations like this come up, you know. And you have to be on-site,” said Mr. Cuomo on CNN in a transcript on Fox News. “I think it’s important to be in a place where you can always respond.”

An equipment failure at a transmission station on the West Side of Manhattan left the densely populated area without power, affecting 72,000 Con Edison customers, before electricity was restored shortly before midnight.

Mr. de Blasio, who returned to New York City after the blackout hit, praised the work of first responders and others in restoring power.

“I’m responsible for making sure everything in New York City is handled quickly handled, handled well,” he said. “I want to say the whole team responded immediately the way everyone has been trained to do, we had top officials on the site coordinating response, first responders were there quickly, got a lot of information out to people.”

He and other Democratic contenders appeared in Waterloo for a “Passport to Victory” fundraiser.

Mr. Cuomo said he could count the number of times he leaves the state “on my fingers.”

“But look, everybody makes their own political judgment and I’m not going to second-guess anyone either,” Mr. Cuomo said. “I do my job the way I think I should do my job and I leave it to others to do the same.”