Yes, when you sleep, the eyeballs are still moving. It is not seen because you close your eyes. However, the eyes still work. The excretion of the tears may help you absorb some bacterium in the eyes. At the same time, you will get the bacterium out of the eyes. This is the self work of the eyes.
When we sleep, our eyes would move. It is a common movement during sleep. When we dream, our eyes move according to what we are dreaming about and it would move more rapid. Eyes moving happens when we fall asleep, because our brain begins to work more slowly, with body relaxing, and closed eyes start to roll around.
To be frank, I don't know my eyes move or not when I sleep. When I encounter your question, I look up some materials and get some information from my friends. Now I will give you my opinion. I hope it can disambiguate your question. Generally speaking, you are awake in your sleep even if your brain is shut down. Our sleep can be classified into two phases: the first few hours and the last hours of sleep before awakening. During the last hours of your sleep, your body needs little non-rem sleep time. In rem sleep, a person's eyes move back and forth rapidly. Thus, it's called "rapid eye movement" or rem sleep for short. Now, we get the answer that during the first few hours of our sleep, our eyes won't move, during the last hours of our sleep before awakening, our eyes begin to move. That's all!