Someone can't unlock your iPhone while you sleep with Face ID if Require Attention for Face ID is on (the default): your eyes have to be open and looking. With the setting off, it's possible. Who Touched My Phone (WTMP), by Gambit Studio, has a Sleeping scene that alarms if the phone is moved at night.
Updated 2 min readGambit Studio
Check the setting
Open Settings > Accessibility > Face ID & Attention.
Make sure Require Attention for Face ID is on.
Apple describes Face ID as attention-aware, and this is the setting that controls it (Apple). With it on, closed eyes won't unlock the phone.
Other ways in while you sleep
Your passcode, if someone has seen it.
A second face enrolled as an alternate appearance: check Settings > Face ID & Passcode (Apple).
Touch ID models: a finger can be pressed onto the sensor; check your fingerprint list (Apple).
Guard the phone at night
WTMP's Sleeping scene arms the right triggers for a phone on the nightstand. If someone picks it up or unplugs it, a loud alarm goes off, even in silent mode, with a flashing screen and flash. Only your passcode stops it, and the log keeps the time for the morning.
WTMP protects while it's armed and the screen is open. It can't tell you what happened before you armed it, and it takes no photos.