The O Estado de Sao Paulo daily on Thursday quoted court sources as saying the Rio judge who earlier cancelled the match had acted on a request from state prosecutors.
They had said that there was no evidence Maracana meet "the minimum necessary conditions to host games or events".
But the authorities in Rio appealed that ruling before a duty judge.
They argued that because of a "bureaucratic mistake" the safety report had not been delivered to the relevant official.
They judge duly overturned the earlier ruling, clearing the way for the game to go ahead.
An estimated 74,000 people are expected to watch Sunday's game, the second test for the stadium inaugurated on April 27 after a multi-million-dollar 30-month renovation.
The friendly is to serve as preparation for the Brazilian national squad ahead of the Confederations Cup in the country from June 15 to 30.
The Maracana stadium will host four Confederations Cup matches as well as seven World Cup games next year, including the finals of both tournaments. In 2016, it will host the opening ceremony of the Summer Olympics.
England are already in Brazil having flown on a private jet straight after Wednesday night's friendly draw in Ireland.
Since 2007, the Rio state government has invested an estimated $430 million in the Maracana renovations, which ultimately will comprise a multi-purpose arena featuring bars, restaurants and shops.
However, the redevelopment has met with controversy in some quarters, with protesters taking aim at the plan to privatize the venue.
Two consortiums are competing for a 35-year lease to operate the Maracana and its surroundings.