I’m having the same problem! Pretty sure it started with iOS 17.4 for me. Some time I’ll open my eyes in the middle of the night while my phone is charging (doesn’t matter wired or wireless) and my iPhone 11 Pro screen will be “kind of” on. The screen is on but the wallpaper is black, no time on the screen, the flashlight and camera button are there, the battery icon is there, the Wi-Fi symbol is there and the Verizon letters are there. When I press the power button, it then, turns the lock screen on as it normally would. Also when this happens my messages stop coming to my watch, I still get other notifications but no messages and the messages don’t sync between my watch and my phone. I have to turn off my phone or watch Bluetooth, wait for the watch to disconnect then turn Bluetooth back on. At that point the watch starts syncing messages again. I recently updated the iOS to 17.5 rc beta. The first two days my phone didn’t turn on overnight but just last night it came on again so I guess it’s not fixed.