Normally you can't grapple something two size classes larger than yourself, right?
But, there are monsters, like the Stirge, that basically 'jump on the back' of the character they attack. I'd look at the mechanics of Tiny critters like that attacking PCs, for guidance, in handling Medium PCs trying to climb onto Huge+ monsters...
Or, it could work something like Improved Grab, in reverse....
Off the top of my head, I might run it something like this:
1) The monster in question must /not/ have Improved Grab
2) The PC must be plausibly able to reach some part of the monster's body that it can't easily reach with it's usual attacks, itself (comparable to latching onto the mid-back of a human).
3) The PC weathers any AoOs for closing with the monster.
4) The PC starts a grapple (could be another AoO) there.
5) You make a grapple check with the monster taking a -20 as if it had Improved Grab. If the PC wins, he's 'riding' the monster. If he succeeds in 'pinning' the monster he has climbed into a position in which the monster can't attack him at all.
The 'rider' interacts with the monster as if he were in a grapple with it, in all ways, but the monster isn't otherwise considered to be in a grapple (much as if it had Improved Grab). The monster must succeed in 'leaving the grapple' with a -20 to it's grapple checks, to dislodge the character. Or, the monster can enter a full-fledged grapple with the character, negating the -20 penalty, but it then counts as being in a grapple.