As you settle into bed at night, close your eyes and begin to doze off, you may notice the colorful light show happening inside your eyelids. When you rub the sleep from your weary eyes, the lights suddenly intensify and bursts of bright colors appear all across your field of vision. A few seconds later, the colors settle down again. While you might appreciate the bedtime entertainment, in the back of your drowsy mind you’ve probably wondered what the heck you’re even seeing.

These strange blobs you see have a name; they’re called “phosphenes,” and researchers believe that actual light may play a role. But not ordinary light — this light comes from inside your eyes. In the same way that fireflies and deep-sea creatures can glow, cells within our eyes emit biophotons, or biologically produced light particles.

“We see biophotonic light inside our eyes in the same way we see photons from external light,” said István Bókkon, a Hungarian neuroscientist who works at the Vision Research Institute in Lowell, Massachusetts.

Biophotons exist in your eyes because your atoms constantly emit and absorb tiny particles of light, or photons. This photon exchange is just a part of normal cellular function. Your eyes can’t tell the difference between photons from outside light and the biophotons emitted by your own atoms. Either way, your optic nerve simply relays these light signals to the brain, which must then decide if it accurately represents the real world around you, or if it’s just a phosphene.

Our eyes actually produce far more biophotons than we end up seeing as phosphenes. “When you rub your eyes, this generates biophotons in many parts of the eyes,” explained Bókkon. “But they are mostly absorbed locally.” Almost all of the biophotons you see are the ones both emitted and absorbed by atoms in the retina — the part of your eye responsible for detecting light.

Inside the retina, millions of tiny cells called rods and cones collect light and convert it into electrical signals. These signals travel through the optic nerve to a part of the brain called the visual cortex. Here, the brain reconstructs an image using the information received from the eyes. When a reconstructed image looks like nonsense, the brain is quick to label the image as unreal, or a phosphene.

But that information doesn’t always come from your retinas. According to Bókkon, phosphenes can originate in various other parts of the visual system, too. Research has shown that direct electric and magnetic stimulation of the brain can trigger phosphenes, and Bókkon hopes to soon be able to prove that biophotons are responsible for these phosphenes as well.

Depending on where a phosphene originates, it can take on a variety of shapes, patterns and colors. Different atoms and molecules emit photons of different wavelengths, which is why we see different colors. A phosphene with an orderly geometric pattern like a checkerboard may have originated in a section of the retina where millions of light-collecting cells are arranged in a similarly organized pattern. Researchers have also found that different areas of the brain’s visual cortex create certain specific shapes of phosphenes.

In the 1950s, the German researcher Max Knoll at the Technische Universität in Munich came up with a classification scheme for phosphene shapes. He studied phosphenes in over a thousand volunteers and came up with 15 categories, including triangles, stars, spirals, spots and amorphous blobs. He discovered that by prodding different areas of the visual cortex with an electrode device, he was consistently able to induce the same kinds of phosphenes.

In the lab, scientists generally use electric probes and fancy magnetic machines to make people see phosphenes. But the phosphenes we mostly see every day are not related to any type of electromagnetic stimulation. Instead, most phosphenes occur spontaneously when the atoms in our eyes exchange their biophotons. You can also trigger phosphenes yourself by applying pressure to your eyes — but be careful trying this at home!

The most common non-spontaneous phosphenes are pressure phosphenes, like the ones you see when you rub your eyes. According to Bókkon, any type of pressure on the eyes can cause them to emit an “excess of biophotons” that create intense visuals. Sneezing really hard, getting whacked in the head, and standing up too fast (causing a drop in blood pressure) are also ways to trigger pressure phosphenes.

The only people who never see phosphenes are people who have been blind since birth. But people who lose their vision due to illnesses or injuries usually don’t lose all visual functions. Because phosphenes can originate in different parts of the visual system, “theoretically, all blind people who could previously see can retain the ability to see phosphenes,” explained Bókkon.

Researchers have also been studying ways to trigger phosphenes in blind patients to try and figure out a way to potentially restore their vision. If scientists can use technology to make the blind see phosphenes, perhaps they can use similar technology make them see real images.

So next time you crawl into bed, close your eyes and admire the phosphenes. Now that you can appreciate the visual effects in a whole new way, you can just lay back and enjoy the show.