The country's crisis management agency urged state bodies to ensure that their websites could withstand attack after media reports of hacking.
The furore began after police shut down The Pirate Bay file-sharing site on Wednesday. The recording industry says says that it is a key source for downloading pirated music and films.
A day after the raid, the police force's own website went down. The main government site went off line in the early hours of Sunday.
Local media said hackers attacked the sites, now functioning again, after the clampdown on The Pirate Bay.
Steffan Karlsson, head of the Emergency Management Agency, said: "We are responsible on a government level for IT security in Sweden, we have to see why has this happened and what can society do about it."
His agency urged all 31 bodies involved in emergency management, such as the police and rescue services, and all 21 local authorities to ensure that they were safe from attacks on their sites, which are sources of information in a crisis.
Karlsson said he did not know what caused the government website to close, but the newspaper Aftonbladet quoted a group called World Wide Hackers as saying that they had arranged an attack on it.
Last year Sweden banned the downloading of copyright protected music and films after being singled out for criticism by Hollywood. The raid on The Pirate Bay was the latest of several actions against suspected online piracy.
Critics have said the police are heavy handed and that people should have access to free information via the internet, including file sharing.
Several hundred people demonstrated in Stockholm on Saturday in support of Pirate Bay, which is open again.
The Pirate Bay: http://thepiratebay.org/
Slyck (news about file sharing): http://www.slyck.com/