Genesis 47:29yarekh
And the time drew nigh that Israel must die: and he called his son Joseph, and said unto him, If now I have found grace in thy sight, put, I pray thee, thy hand under my thigh, and deal kindly and truly with me; bury me not, I pray thee, in Egypt:
Jacob uses the same oath gesture to secure burial outside Egypt.
Numbers 5:27yarekh
And when he hath made her to drink the water, then it shall come to pass, that, if she be defiled, and have done trespass against her husband, that the water that causeth the curse shall enter into her, and become bitter, and her belly shall swell, and her thigh shall rot: and the woman shall be a curse among her people.
Thigh rotting is a sign of guilt in the jealousy ordeal.
Jeremiah 31:19yarekh
Surely after that I was turned, I repented; and after that I was instructed, I smote upon my thigh: I was ashamed, yea, even confounded, because I did bear the reproach of my youth.
Smiting the thigh expresses repentance and shame.