There's nothing you can do to stop that.
All you can do is try to survive the experience.
Not all of the ground will collapse -- the part near the walls stays put.
Walk along that edge of the area, and you should survive.
Now that the ground has collapsed, look around to see what's happened.
Notice those wooden stakes in the walls of the newly-formed canyon?