You're in luck, 'cause there are actually rules in Pathfinder for cave-ins and collapses:
Characters in the bury zone of a cave-in take 8d6 points of damage, or
half that amount if they make a DC 15 Reflex save. They are
subsequently buried. Characters in the slide zone take 3d6 points of
damage, or no damage at all if they make a DC 15 Reflex save.
Characters in the slide zone who fail their saves are buried.
Characters take 1d6 points of nonlethal damage per minute while
buried. If such a character falls unconscious, he must make a DC 15
Constitution check each minute. If it fails, he takes 1d6 points of
lethal damage each minute until freed or dead.
The given CR for this sort of environmental hazard is 8, but I'm sure you'll be able to scale it up or down, depending on the party level and your intended deadliness of the encounter :-)
Edit:
Going deeper, as required by Eric B :)
On escaping the collapse, let me keep quoting the paragraph I linked to:
Characters who aren't buried can dig out their friends. In 1 minute,
using only her hands, a character can clear rocks and debris equal to
five times her heavy load limit. The amount of loose stone that fills
a 5-foot-by-5-foot area weighs 1 ton (2,000 pounds). Armed with an
appropriate tool, such as a pick, crowbar, or shovel, a digger can
clear loose stone twice as quickly as by hand. A buried character can
attempt to free himself with a DC 25 Strength check.
But how does the underwater situation come in to play? Apart from drowning, we have:
Digging people out: Because water is denser than air, objects submerged in water will have higher buoyancy than when in air. Thus moving rubble and rocks should be easier under water. However, unless our heroes are affected by freedom of movement or similar enhancements, movement is down to one quarter (assuming successful swim checks). Right off the bat, I'd say moving loose rocks underwater can be done at roughly the same speed as above water. Few large rocks would decrease the time, and a huge pile of rubble would probably take quite a bit longer to move under water than above.
Freeing yourself: Because stuff is easier to mover under water, I'd give the submerged character a +5 bonus on the strength check to free himself.
Damage from the collapse: Since damage dealt underwater is halved, I'd apply the same 50% discount to damage from falling rocks.
Following the link, you'll see that the 5-ft. step is a specific action. Although other actions allow movement of only 5 ft. these don't meet the feat Step Up's conditions as moving only 5 ft. is different from taking a 5-ft. step.
The game provides no rationale
It's unclear in the rules how the character can differentiate between a 5 ft. step and, for example, taking the Withdraw action and only taking 5 ft. of movement, but somehow the character can. The game abstracts much of the character's ability to read the battlefield. If a rationale is necessary to maintain immersion, just say 5-ft. step, because it behaves differently mechanically anyway, obviously looks different to the character, and be done.
Best Answer
You run until you are out of sight/hearing of the source
This is one of the rare instances where d20pfsrd is wrong *, as their text for the frightened condition differs from that on the paizo PRD, which is identical to the text presented in the Core Rulebook, 5th printing, page 563 (This is also unaffected by any of the official Errata from 1st to 6th printing):
(emphasis mine). The bold part is present for panicked, as well. Take note that the condition timer is still running, and you immediately start running again if you see/hear the source of your fear as long as the fear effect itself is active.
* In fact, the text on d20pfsrd is taken directly from d20srd.