my two boys do this all the time, esp if they smell something they really like
I just gave everyone a bit of banana and one of them was so eager to get it he bit my finger OUCH
from now on, the treats go in a bowl, no more finger feeding them :/
what RatPack said is pretty much what I've done too.
talk to them before you put your hand in the cage, maybe say the same thing each time so they know what to expect
and make a fist and put your hand in slowly.
they are less likely to mistake that for food. I put my hand in with my palm down, made into a fist, if I'm at all concerned that someone is gonna nip me because they arent' fully awake or otherwise not paying attention
some people also make a high pitched Eeep sound when the rat puts their teeth on you, like another rat would do to tell them "no" don't bite me
sometimes a rat will mistake you for another rat and try to pull you into the cage with them, what your guy is doing sounds more like that- which is adorable, but of course not something you want to encourage lol
I've had a couple of rats try to pull me into the cage. it's sweet but not when they break skin :/