Yes, once a time, my younger brother slept in my room and I found that his mouth half open and his eyes rolling back. At that time, I thought he had not fallen asleep and shook my hands before his eyes, but he indeed fell asleep without a response except his rolling eyes. Funny enough! Later, I learned that sleep can be divided into two sorts: the quick wave sleep and the slow wave sleep. In quick wave sleeping, electroencephalogram presents synchronous quick wave, sensation function and muscle tension attenuate, and muscles of the whole body are totally limp, so following symptoms appear: the eyes roll back, blood pressure fluctuate, fast and irregular breathe and often make a dream. In slow wave sleeping, electroencephalogram presents synchronous slow wave, and the eyes do not roll.
Based on your description, I can see that your eyes are simply not infected, but the muscle around your eyes and eyelid have something wrong. That would lead to your situation. Also, another cause of that is a lack of sleep, perhaps you are quite tired recently. My advice for you is to alter your lifestyle before consult a doctor, who would give you some relevant treatment.