Because saliva shields your teeth from damaging acids over the day. However, when you sleep, your body produces less saliva, which causes your mouth to become dry. Cavities are more likely to develop if you don't brush your teeth before night.