Quitting weed makes me see through my eyelids

Soooo at times I fall into an habit of smoking weed every night before going to sleep. Whenever I stop this weird thing happens the first night I go to sleep weed free: while I fall asleep the closed eyes visuals that usually are just random colors begin to shift into shapes of random objects/entities, like faces and stuff Then, further into it, I can kind of see through my eyelids, in the dark. I can see the outlines of the ceiling, and all of the details of my room, usually at this point I open my eyes because that kind of freaks me out and when I open them the outline I was seeing corresponds to what I actually see with open eyes.

Does anyone know what actually happens and why??