From a purely physiological point of view, the basis for the star appearing is oxygen deficit, pressing on the eyes to make blood flow stop, constricting the throat which reduces blood pressure and so on.
As to the star appearing independent of this, i have no idea. I suspect it has more to do with sleep states than anything to do with geniuses.