What is the origin of this phrase?

It is really a corrupted version of "heels over head" as I read in one explanation?

Or does it describe someone's carriage; mean walking upright; with a straight back and good posture, rather than slumped forward?