Yes, if your phone is locked and you're asleep, Face ID will still unlock it as long as you're wearing glasses or contact lenses.