Been there, done that! And you did the right thing -- get off, get out of the way, and let the horse get out on its own.
The first time it happened to me, I was kid, we were in AZ desert and my horse sank to its chest in quicksand in a dry wash. Most recently, Solo and I were down in coastal NC about a year ago and boy, those cypress bottoms can sneak up on you! One minute you are walking along, next minute, you are four feet closer to the ground.
I have learned, if you ever have ANY doubt about the ground in front of you, get off and check! I'll never plow trustingly through again!

Solaris -- 16 hh Appendix Quarter Horse = MY DREAM COME TRUE!
Wander With Wild ThingsWe Are Flying Solo