The violence poses an early test for the government of new Prime Minister Naftali Bennett, whose patchwork coalition came to power on Sunday on a pledge to focus on socioeconomic issues and avoid sensitive policy choices towards the Palestinians.
An Egyptian-mediated truce that halted fighting between Israel and Gaza militants did not immediately appear to be threatened by the flare-up, with the overnight Israeli airstrikes giving way to calm by morning.
There were no reports of casualties on either side.
The overnight violence follows a march in East Jerusalem on Tuesday by Jewish nationalists that had drawn threats of action by Hamas, the ruling militant group in Gaza.
Israel's military said its aircraft attacked Hamas armed compounds in Gaza City and the southern town of Khan Younis and was "ready for all scenarios, including renewed fighting in the face of continued terrorist acts emanating from Gaza".
The military said the strikes came in response to the launching of balloons laden with incendiary material, which the Israeli fire brigade reported caused 20 blazes in open fields in communities near the Gaza border.
A Hamas spokesman, confirming the Israeli attacks, said Palestinians would continue to pursue their "brave resistance and defend their rights and sacred sites" in Jerusalem.
But analysts suggested Hamas refrained from firing rockets around the march and after the Israeli strikes to avoid an escalation in Gaza, which was devastated by May's aerial bombardment.
"It (the ceasefire) is very fragile. The current calm may give the Egyptians a chance to try and cement it," said Talal Okal, an analyst in Gaza.
Israel's Army Radio reported that Israel had informed Egyptian mediators that direct Hamas involvement in the balloon launch would imperil long-term truce talks. Israeli officials did not immediately confirm the report.
Hours before the overnight strikes, thousands of flag-waving Israelis congregated around the Damascus Gate of Jerusalem's Old City before heading to Judaism's holy Western Wall, drawing Palestinian anger and condemnation.