I have had to free a couple, either alone or with assistance, using the methods mentioned (rope on the far leg or at the basr of the neck) and not much difficulty.
Last year I had one big gelding jammed up against the front of the stall. He wasn't blocking the door, and luckily there was a feed door above the water buckets, so I was able to remove them while standing safely outside. However, the placement of his legs just did not allow me get the rope on them safely. I put it under his neck, but I could not budge his heavy load. At this point I started to get frustrated and worried....but also thought, "hey if I am pulling, shouldn't he be doing some kind of pushing?". So, exasperated, I stood there, rope in hand, and started flailing my arms about - I wasn't whipping him with it, but from his perspective that may be what he saw coming - and I snapped "you aren't trying hard enough!!!" Lo and behold he shoved himself back off the wall and popped up.
So I am glad to see "poke him with a broom" and "flap your arms at him " as legitimate strategies on here!
My stupid mare who likes to get cast will stick her legs over her back door. The first time she did it (and unstuck herself. I found the aftermath at nightcheck), she kicked the barred top door/window so hard she shattered the glass (thank God for the bars keeping her from putting her foot THROUGH the glass). One time last summer, I was standing talking to the farrier in view of her exterior stall door. I had walked by her a few minutes earlier and had seen that she was down, sleeping. I happened to glance up and just see a foot dangling out her open window. Yep, she was cast. Stupid mare, who HAD been laying in an appropriate direction, rolled prior to getting up and flipped herself over. Dumb ass mare.
It DOES help if they assist. Not flail, but actually help try to push or roll. The above mare lays there like a slug, and she's big, so she can be hard for me to flip solo. But, that being said, I would prefer the slugs to the panicked, especially when alone.