I had a bad habit of looking at my iPhone in bed and I would do this frequently during the night.
Since getting the iPhone X, unlocking the phone with face ID hardly ever worked whilst lying in bed. I got frustrated with this and since my password is long I just gave up looking at my phone in bed.
This has certainly improved my sleep.