Psalm 104:2-23 is clearly a parody of Gen 1 as follows:
- Day 1: Light - Gen 1:3-5 vs Ps 104:2
- Day 2: waters above and below - Gen 1:6-8 vs Ps 104:6
- Day 3: dry land and vegetation - Gen 1:9-13 vs Ps 104:7-18
- Day 4: Moon and sun - Gen 1:14-19 vs Ps 104:19
- Day 5: fish and birds - Gen 1:20-23 vs -?
- Day 6: animals and mankind - Gen 1:24-27 vs Ps 104:20-23
However, it is very likely that Ps 104:9 is a parenthetical reference (It would otherwise be out of place in the above sequence) to Gen 9:11, 15, which reads:
I establish my covenant with you: Never again will all life be
destroyed by the waters of a flood; never again will there be a flood
to destroy the earth. … I will remember my covenant between me and you
and all living creatures of every kind. Never again will the waters
become a flood to destroy all life.
Thus, Ps 104:9 is a reference to Noah's flood not the original waters that covered the earth in Gen 1:2 (although that is not excluded).
That they turn not again to cover the earth — Once indeed they did,
namely, in Noah’s flood, because God commanded them so to do; but not
since, because he prohibits them, having promised not to drown the
world again. God himself glories in this instance of his power, and
uses it as an argument with us to fear him, Job 38:8, &c.; Jeremiah
5:22. And surely this, if duly considered, would keep the world in awe
of God and his goodness, that the waters of the sea would soon cover
the earth if God did not restrain them.