In Hebrew, to say someone went bankrupt, we say that he pashat et haregel פשט את הרגל. This literally means "he extended his leg (or foot)", which doesn't seem to have much connection to bankruptcy.
But I happened to be reading a mishna from Masechet Ketubot, and I found the origin of this expression. Chapter 13, Mishna 5 (108b in the Gemara) reads: הפוסק מעות לחתנו, ופשט לו את הרגל
"If a person stipulated to give money to his son-in-law, and he pashat lo et haregel..." We'll explain the origin of the phrase in a minute, but the meaning here is that the father-in-law failed to pay the dowry to his son-in-law. It is easy to understand how the concept was extended to anyone who does not pay money they owe.
As to the strange imagery - it's first of all important to note that the phrase in the Mishna says pashat lo et haregel, he extended the foot "to him", and not as in modern Hebrew just "pashat et haregel" - "he extended the foot" (although this version appears in some manuscripts of the Mishna and Gemara). The idea here is that the father-in-law "stuck it to" his son-in-law.
Different commentaries explain the metaphor as follows:
Rashi: It is a derisive term, and can either mean "Take the mud and dust from my foot" (because that's all you're going to get) or "Hang me by my foot" (and you still won't get money from me.)
Rivan: "You can take my foot" (but I don't have any money to give you).
Rambam: It means the father-in-law fled to another country, "picked up his legs" and left.
Meiri: It is a way of saying the father-in-law died.