What is the origin of the saying pulling your leg?

I don't know but maybe some person was kidding with someone then yanked off their leg