24:1-2 David affirmed Yahweh's sovereignty over all things. He is over all because He created all. Verse 2 looks back to the creation of the world. The "rivers"(NASB) or "waters"(NIV) is a synonym for "seas."It probably describes the watery chaos out of which Moses described the world emerging in the Genesis account of creation (Gen. 1:10).
24:3-4 The psalmist then wondered who could go into the sanctuary of such a great God on Mt. Zion. Right actions and attitudes are necessary if one hopes to attain admission to His presence. Idolatry in particular disqualifies any potential worshipper.
24:5-6 God will bless those individuals who seek God's fellowship by pursuing the ways of righteousness by granting their desire.
"Whatever is functioning as it should is righteous': in court, the man in the right; in character, the honest man; in the run of affairs, success. Probably all three are present in this context. This man has the smile of God upon him: he is accepted, he is helped to live an upright life, his affairs under God's blessingwill run as they should [cf. 23:3b; 65:5]."70
The psalmist referred to the God of Jacob (NIV) here. This reference to Jacob brings to mind Jacob's wrestling with the Lord to receive a blessing from Him (Gen. 32). All who similarly struggle to obtain the Lord's blessing by pursuing righteousness will receive their request as Jacob did.