Another interpretation of (Psalms 36:7): "Your righteousness is like the mighty mountains; [your judgments are like the great deep]." Rabbi Judah bar Simon said: The righteousness that You performed with Noah in the ark caused his ark to rest for him upon the mountains, as it is said (Genesis 8:4): "And the ark rested [... upon the mountains of Ararat]." "Your judgments" are those which You carried out with the generation of the flood; You dealt strictly with them down to the deep, as it is said (Genesis 7:11): "On that day were split open [all the fountains of the great deep]." And after the retribution, behold: (Psalms 36:7) "Man and beast You deliver, O Lord." When? When (Genesis 8:1) "God remembered Noah."
Why Noah's Ark Rested on the Mountains of Ararat
Midrash Tanchuma Buber, Noach 8:7
ד"א צדקתך כהררי אל. אמר ר' יהודה בר סימון צדקה שעשית עם נח בתבה גרמה לו שתנח תבתו על ההרים, שנאמר ותנח התבה [וגו' על הרי אררט] (בראשית ח ד), משפטיך שעשית עם דור המבול דקדקת עמהם עד תהום, שנאמר ביום הזה נבקעו [כל מעינות תהום רבה] (שם ז יא), ואחר הפורענות (הרי אומר) [הוי] אדם ובהמה תושיע ה' (תהלים לו ז), אימתי ויזכור אלהים את נח.