When you look at the sun with your eyes closed you get patterns that ebb and flow with a certain periodicity. I tested this today and discovered that the periodicity has nothing to do with pulse or heart rate. So what causes the patterns and what determines the periodicity?
I know exactly what you mean and can only assume that it is the blood that you see through your eyelids.
I also get them if (as i discovered as a young child) going to sleep with the backs of my fingers in my eyes and applying a bit of pressure... which causes some very very strange, uniform and almost star trek wormhole-esque patterns!
Well as you follow the light around your eyelids you are moving the source without knowing your doing it. What seems to be the light moving is in fact your eyes moving the light.
Try and keep your eyes still and you will see its impossible to do, because of the need to follow the light. Its mega annoying lol