Found this from Rabbi Mansours 'Daily Halacha' site:
http://www.dailyhalacha.com/Display.asp?PageIndex=36&ClipID=2197Is There a Beracha That One Recites During an Earthquake?If a person experiences an earthquake, is there a Beracha that he must recite?
The Mishna in Masechet Berachot (54) writes that one who experiences “Zeva’ot” recites the Beracha of “Baruch Ata Hashem…Ose Ma’ase Bereshit.” Rashi, based on the Gemara, explains the word “Zeva’ot” as referring to earthquakes. Accordingly, Maran rules in the Shulhan Aruch (Orah Haim 227:1) that when experiencing an earthquake one recites the Beracha of “Ose Ma’ase Bereshit.” This Halacha is also mentioned by Maharam Ibn Habib (Israel, 1654-1696), in a responsum cited by the Hid”a (Rav Haim Yosef David Azulai, 1724-1806), in his Birkeh Yosef (227).
The Petah Ha’debir (Rabbi Haim Pontremoli, Turkey, early 18th century) noted that in his area, when an earthquake struck, people did not recite the Beracha of “Ose Ma’ase Bereshit,” and instead recited the verse “Shema Yisrael Hashem Elokenu Hashem Ehad.” He writes that presumably, people were simply not in the frame of mind during an earthquake to recite the Beracha required by Halacha, and instinctively recited “Shema Yisrael.” Halachically speaking, however, one should certainly recite the Beracha of “Ose Ma’ase Bereshit.”
If an earthquake is followed by aftershocks, does one recite a Beracha over each aftershock, or does the Beracha recited over the initial tremor cover the subsequent quakes, as well?
The Halacha in this case resembles the law concerning the Berachot over thunder and lightning. If a person recited the Berachot during a thunderstorm, and then the storm passed, the sun came out, and things returned to normal, he would recite the Berachot anew if another storm then hits and he sees lightning and hears thunder. In the case of an earthquake, too, if a person recovered and regained his bearings after the quake, resuming his normal routine, and then he experiences an aftershock, he should recite the Beracha again. If, however, the aftershock occurs while he is still reeling from the initial tremor, then he does not repeat the Beracha.
The Gemara and Yerushalmi give several reasons for why earthquakes occur. Leaving aside the seismological causes, our Sages pointed to several factors on account of which God will cause the earth to shake. Notably, one of the reasons given in the Yerushalmi (Berachot, chapter 9) is the legalization of Mishkab Zachur (same-gender relationships). The institutionalizing of this perverse behavior, the Sages teach, causes the earth to tremble. Although we never truly know God’s calculations, it is hard to ignore the fact that recently, an earthquake was felt by millions of people across the East Coast of the United States – a very rare event – just a few short months after this perversion was given formal legalization in New York.
In any event, it is certainly clear that the advent of an earthquake should inspire us to redouble our efforts to repent and grow in our Torah observance.
Summary: If one experiences an earthquake, he should recite the Beracha of “Ose Ma’ase Bereshit.” If aftershocks occur after he had already recovered and moved on from the initial quake, then he should recite the Beracha again. The occurrence of an earthquake should be taken as a “wakeup call” to repentance and renewed efforts to grow spiritually.