First, I reject the attempt to spiritualize either one, as though all they are about are, say, the God’s faithfulness to his people or the firmness of his covenant, etc. It might well be that this is what the Psalmist wants to tell us about, but he clearly wants to make the point starting from facts about the earth.
Notice that in both Psalms “earth” is not primarily compared to “heaven” but to “the waters” or “the floods”. The reference to Genesis 1 is unmistakable, that is, the waters are the domain of dark existence outside of divine activity. This dark existence, however, is not in any way opposed to creation from nothing, for there is never a hint in Genesis that God fashions the world out of it. It is not matter but chaos. The cosmological point here is both subtle and far-reaching – there is a chaos under things: a domain of incoherence, unintelligibility, tendency to corruption, etc.. There is here a hostility or, better yet, brute indifference to life and value that must be overcome if “the earth” is to exist at all.
But this overcoming of the chaos does not consist in merely build a world apart from it. The world is not a mere stronghold set against the chaos, as Ps. 24 seems to suggest – it is also incorporated into the earth, as suggested by Ps. 104. The waters are made into springs, they are given a direction of flow from the mountains to the sea, etc.
To be sure, we’ve moved past the idea that the chaos of things is water, but this is certainly a minor and uninteresting point compared to the more general cosmological claim. Some day we’ll move beyond our own cosmological versions of “the waters”: entropy, copying errors in gene replication, radioactive decay, panda’s thumbs, wavefunction collapse, junk DNA, turbulence, etc. but it’s doubtful that cosmology will ever drive out things that are essentially unpredicable, chaotic, surprising, merely probable, falling away from an ideal, unlucky, undetermined, wildly excessive…
At the same time, there are clear senses in which this chaos is brought into “the earth”, that is, ways in which things that are essentially chaotic are incorporated into order allowing for intelligibility and life. Entropy gives the arrow of time, copying errors give rise to evolution by way of selection, unpredictable events arrange themselves into statistical law, the death of stars makes organic life possible, the wild excess of the effusion of seeds feeds the animals, etc. These are all the updated examples of Psalm 104’s account of how the waters are incorporated into the earth.
One account of this sort of incorporation of chaos is the one suggested by design arguments or fine tuning, where something essentially undetermined receives determination extrinsically. This might well happen, but it does not account for a great deal of things. Entropy is not only defined in relation to chaos and disorder but is also the essential intrinsic condition for the order of time: an order without which nothing else in physics can happen; the death of a star is not only an essential collapse into disorder but an intrinsic sine qua non of organic life. This is certainly a more interesting way in which chaos is brought into the earth.
This is what the Psalmist rejoices in, and what he takes as God’s manifestation to the world.