"his legs doubled up and one arm twisted back underneath his body"

What does "legs doubled up" mean? What happens to the legs 0_0?
Are they tangled together or what?
I tried to google image it but i only found some gymnastic photos.
It's from Roald Dahl's Lamb to the Slaughter.

As always, thank you for your help.