We went through this with Beau and our 10 year old son. I believe it is a sign of establishing dominance. We told Beau, "No" and started having our son work with him, having him sit, stay, down, etc. As soon as Beau started responding to the commands, the humping stopped. I guess Beau needed to understand the order of the pack.
Now our new female Peke puppy tries to hump Beau. :o
Angela