I think you're probably talking about eye boggling. If it looks like your ratties eyes are shooting in and out rapidly then it's an eye boggle. It looks funny (or even scary) but you should be proud to know your rattie is very happy!
eye boggling occurs during extreme bruxing, in other words, when your rattie is extremely content!
I read about eye boggling but I've only just seen it a few days ago. I laughed my head off because my Ostrich kept boggling when I was petting him. I've also seen Penny do it when she's nursing her babies (she's a happy momma).
If its not boggling (previously mentioned) and your rats are frozen with their eyes bugged out, they are nervous and scared about a situation. Are they young and new? Sometimes they smell or hear something that we cannot and they react.