Valmiki Ramayana Bala Kanda Sarga 40 Shloka 14
Original Shlokaयदा पर्वणि काकुत्स्थ विश्रमार्थं महागज:।।1.40.14।। खेदाच्चालयते शीर्षं भूमिकम्पस्तदाभवेत्।
1 source checked for this shloka
काकुत्स्थ O Rama, महागज: that mighty elephant, पर्वणि on certain sacred days, यदा when, विश्रमार्थम् for refreshing, खेदात् from weariness, शीर्षम् head, चालयते shakes, तदा then, भूमिकम्प: earthquake, भवेत् takes place.
O descendant of Kakustha when that mighty elephant shakes its head for rest from weariness on certain sacred days earthquake occurs.