Elie Moyal told public radio on Monday that Ehud Olmert and his defence minister were to blame for the lack of defenses for the town.
Moyal said: "If he [Olmert] is incapable of defending our town, he should resign along with Defence Minister Amir Peretz, because it is their job to find solutions.
"We are going to close Sderot until such a solution can be found" to counter the rocket attacks, the mayor said.
Moyal has demanded tougher military action to stop the attacks, including a ground operation in Gaza - despite Israel's withdrawal of its troops from the territory last year after a 38-year presence.
Moshe Katsav, the Israeli president, is expected to visit the working class town, close to the border with the Gaza Strip, to express solidarity with the increasingly angry and frightened community.
Sderot, where the defence minister himself was once mayor, had been due to observe a general strike on Monday, but the town council postponed the action to allow for Katsav's trip.
Municipal officials had planned to block all roads in and out of Sderot in protest at government inaction.
Peretz, expected to accompany Katsav on his tour later on Monday, told the parliamentary defence and foreign affairs committee that Israel was "absolutely determined" to end rocket attacks on Sderot.
Speaking on Army Radio, Peretz did not rule out stronger action if the rocket firing continued.
"We are going to close Sderot until such a solution can be found"
Elie Moyal, Sderot mayor
Haim Ramon, the justice minister, told public radio that the government was planning a "series of measures" to help Sderot and neighbouring communities.
Palestinian groups in Gaza have fired about 600 makeshift rockets at Sderot this year. Over the past week, about 100 have been fired.
Casualties in Israel from Palestinian rockets are far smaller than those from Israeli air strikes in Gaza, but that is little solace to Sderot's 20,000 residents.