Ok here this might give you better and more info about it than i can... but its still a good thing..:
TEETH GRINDING
Q: When my rat is sitting with me, sometimes her head shivers slightly and she makes funny noises with her teeth as if chewing on something, but she's not eating. Is this "teeth grinding"? Is it similar to cat purring?
A:
Yes, this is teeth grinding and they always seem to do this while they are very content. They also grind their teeth to keep them at the proper length (as food really has nothing to do with keeping them short) and this could simply be what they are doing.
Heres the link to find that and more info/facts about rats:
http://www.rmca.org/Resources/rmcafaq.htm