Yes, it's perfectly safe to allow the milk to sit out overnight. A good trick is to use cold milk in the mixture with the sourdough starter and flour. This slows the fermentation down and ensures it will last the night. The good bacteria in the sourdough starter will stop it from going bad.