Yes leaving a pacifier in a babies mouth all night is perfectly fine and actually when the baby is newborn to 6 months of age the pacifier can reduce the risk of SIDS "Sudden Infant Death Syndrome".
So if your baby is sleeping fine or better with the pacifier through the night then continue to let the baby sleep with a pacifier at night.
I actually slept with a pacifier in my mouth at night until age 4 and then I finally gave it up on my own during that time.