Most commonly if it's not aggressive, they do it to their humans because they are feeling horny. However if he is also spending a lot of time grooming himself down there it might be time for a hair ring check. If it's just him feeling horny some people have had luck giving their chins a chinnie buddy (fleece stuffed fleece stuffed animal) to take their urges out on. You can also take your hand away and say no when he does it.
They can get a ring of fur caught around their penis, which can cut off circulation. To check you need to fully extend it (it's a few inches long) to check the whole length of it. Here is a good explanation Hair Rings there are also videos on YouTube that show how it's done, you can also take him into the vet to have them show you how to do it. There are different opinions on how often to do checks, but personally I don't unless they are spending a lot of time grooming down there or the penis is actually hanging out, but others feel it should be done once a month regardless just to make sure no hair starts to build up around it.
My first chin Perkins never humped me, so it was a shock when my new chin Buttons started up. I can't get him to stop! I think he does it mostly to say "Hey, I'm the boss. Not you."