You are almost never better off in the (cold) water than on the boat. I know the heel was probably a contributing freakout factor, but since the boat wasn't sinking, you did the right thing staying onboard, even in difficult conditions. I went back and reread your OP - staying out of the cabin was logical, in case the boat did go all the way over. In terms of positioning yourself while awaiting help, sitting on the floor of the cockpit, legs running athwartship, would likely have been your best option - somewhat protected from wind and spray, any sudden boat movements can't throw you very far, and severe boat heel lets you brace your feet against what was a vertical surface but has now become a "floor" on which to stand until the heel subsides. You can also brace against the opposite side too, depending on the specific configuration of the cockpit. Grab extra cushions, PFDs, other soft goods for padding if you are really getting thrown around. (Note that in extreme weather conditions, below decks might be better. Hypothermia is really bad, and your decision making goes to hell.) All this is tough to think about in a situation that feels extreme at the time.
Again, you did well. You didn't put yourself in additional danger, you saved the boat, you asked for help (didn't play macho), and you are now squeezing every ounce of learning from the experience. It could have been a LOT worse.