Bereshit / Genesis 1:9 · Drash
וַיֹּאמֶר אֱלֹהִים יִקָּווּ הַמַּיִם מִתַּחַת הַשָּׁמַיִם אֶל־מָקוֹם אֶחָד וְתֵרָאֶה הַיַּבָּשָׁה וַיְהִי־כֵן׃
And the Almighty said: "Let the waters that are under the heavens gather into one place, and let the dry land appear." And it was so.
Drash דְּרָשׁ
Proud waters
Sometimes you get your place, but want more, and something pulls you over the edge. The midrash tells how this happened to the waters on the third day.
The midrash tells: the waters gathered into the hollows, but at once grew proud and went to cover the earth again. God shouted at them and made the sand a boundary for the sea, like a fence around a vineyard. Since then the waters see the sand and turn back.
How Pirkei DeRabbi Eliezer explain it
Pirkei DeRabbi Eliezer Let the waters gather
On the third day the earth was flat as a valley, and the waters covered the whole earth. When the word "Let the waters gather" went forth from the mouth of the Power (הַגְּבוּרָה), the edges of the earth, the mountains and the hills rose up and spread over the whole earth, and hollows formed within the earth. The waters rolled and gathered into the hollows, as it says: "And the gathering of the waters He called Seas" (Bereshit / Genesis 1:10).
At once the waters grew proud and rose to cover the earth again, as at first. Then the Holy One, blessed is He, shouted at them, subdued them, put them under the soles of His feet and measured them in the hollow of His hand, so that they would neither grow nor shrink. And He made the sand a boundary for the sea, as a man makes a fence for his vineyard. And when the waters rise and see the sand before them, they turn back, as it says: "Do you not fear Me, says the Eternal, do you not tremble before Me, Me who set the sand as a boundary for the sea?" (Yirmeyahu / Jeremiah 5:22).
Takeaway
"Shouted" (גָּעַר) is the same word as in Rashi in Pshat 1:6: the heavens set "at the shout" of the Holy One, blessed is He.
"Measured them in the hollow of His hand" is an image from Isaiah: "Who measured the waters in the hollow of his hand?" (Yeshayahu / Isaiah 40:12).
"The Power" (הַגְּבוּרָה) is one of the sages' names for God: of the first two commandments the Talmud says "we heard them from the mouth of the Power" (Makkot 24a).
Jeremiah's verse about the sand is quoted by Radak in Pshat too, and Agra DeKala in Remez hears "trembling" in "sand".