Sneezing is a reflex, which means that it's an uncontrollable physical response to an outside stimulus. When something, say a piece of dust or a strong odor, stimulates nerve endings in the lining of the nose, the stimulus travels to the central nervous system and is then routed back to the muscles of the face, throat and chest. Once stimulated, these muscles go to work and cause us to forcefully expel air from the mouth and nose. Or, in other words, we sneeze.
Because the nose lining tends to swell when we lie down, making it even more sensitive to sneeze-causing particles, it would seem that sneezing would be likely during sleep. However, since there is little airflow in most bedrooms at night, and little movement to stir up dust and other particles, the nose is not bombarded by as many foreign particles as it is during the day. Furthermore, the area of the brain responsible for the sneeze reflex relaxes while we sleep. So, even when a particle does touch the nose lining, the brain doesn't notice, and we don't sneeze.