Are you holding the phone too close to your face?
I was getting frustrated that FaceID wouldn't work for me in bed when I wasn't wearing glasses, but I discovered it was because it was holding it so close to my face to read the screen (I'm very short sighted) and the camera couldn't focus (yes my eyesight is that bad haha).