Sleeping with a primer on is not recommended, especially when you wore it throughout the day. It may trap pollutants, sweat, bacteria, and excess sebum, blocking the skin's pores that can lead to acne breakouts.  Generally, wearing make-up, including a primer, for longer periods may block the pores in your skin.
You should avoid using a primer at night because sleeping with a primer on may interfere with the natural renewal process of the skin, which may lead to the development of wrinkles on the skin.
Sleeping in a primer with SPF or pearlescent ingredients such as mica or silica is not recommended. In fact, some sunscreen ingredients can irritate skin and chemical sunscreen ingredients are absorbed into the body to potentially harmful levels.
However, there are exceptions.  Some makeup primers are fine to sleep in and it depends on the primer. Some primers act like moisturizers to prevent skin dryness and may contain beneficial ingredients such as vitamins. Others may help unclog pores such as those with salicylic acid. Primers with dimethicone, cyclomethicone, and other related ingredients (called siloxanes) are fine to sleep in.
If you're not sure whether your primer will harm your skin while you're sleeping, it's recommended to remove the primer before sleeping.
There are better products for nighttime beauty such as retinoids that help stimulate collagen renewal and can only be applied at night.
[box] Contributors to This Answer:
Daniel Boyer M.D. - Dr. Boyer is a practicing Doctor of medicine at Farr Institute with a focus on medical research. He specializes in molecular biology, histology, pharmacology, embryology, pathology, pediatrics, internal medicine, surgery, gynecology, and obstetrics.
Cynthia Bailey, MD, FAAD - Board Certified Dermatologist Dr. Cynthia Bailey is based in Sebastopol, CA (Northern California wine country). Over the last 30+ years, she has helped over 15,000 patients overcome frustration and embarrassment caused by rosacea, acne, melasma, sun damage, dry skin, wrinkles, and other skin impurities. [/box]