The outage was the result of a problem at a switching station in Fair Lawn.
At its height, there were 26,576 customers without power in Passaic County and 13,542 in Bergen County.
A spokesman says everyone was restored by 8 p.m.
PSE&G is now trying to figure out what happened at the switching station.