That sounds like a pretty awful situation. Glad you came out of it without any permanent damage.
So were you on your butt, legs facing your opponents and then rocking or were you rocking from a prone position?
Not prone. I was doing it just like on the Gracie Basics videos; rocking from supine to sitting.
This has the benefit of keeping your head moving, so it's not a static target. It also makes it difficult for your opponent to predict when you will stand.
I was rocking in a circle so as to keep them changing positions. The more they have to use their feet to move, the less they can use them to kick.
I think one of them tripped over me and fell down, and I used that as an opportunity to stand up.