I have no idea how he did it, but last year I had a rooster in a similar predicament. Found him literally hanging from the fence by one spur about three feet off the ground. Don't know how long he'd been hanging like that, but he wasn't even struggling any more when I found him and his leg seemed quite stiff.
Decided to give him a chance before wringing his neck so I worked his leg up and down, back and forth for about five minutes until it seemed like the stiffness was gone. He never struggled while I was doing this. I put him on the roost after that to let him be and see if he was going to make it. The next day he walked a bit stiff. The following day I could not see any problems with him at all.