A severe storm is blamed for widespread power cuts in Brazil which lasted more than five hours, the government says.