Oh my! I have had one start in on that same behavior, and all I can say is that I had to walk away to another room where he couldn’t get to me. I didn’t have to wait too long before he was neutered, but I still felt sorry for leaving him alone. Sometimes that is all you can do. Limit your time with her, and if she starts to get too excited, gently push her off and walk away. My boy still likes to hump his girl a lot from time to time, and when he starts getting into it, she just hops away out from under him. He of course looks at her like “Hey! Where are you going?”, but eventually after a few snubs he leaves her alone.
Another thought is to give her a stunt double (stuffed toy). If she ignores it, you could rub your hands on it to make it smell like you and then give it to her again. That way she still has something to do her natural bunny business on while not biting your leg.
Good luck!