Hello lucie197,
Thank you for reaching out in Apple Support Communities. We understand you heard an unexpected alert on your iPhone in the middle of the night. We'll be happy to help.
There's a possibility the alert you heard was an emergency or government alert. You can learn more by reviewing the details outlined in this helpful article: About emergency and government alerts on iPhone and Apple Watch
You'll also want to see if there's an alarm that triggered the alert you heard: How to set and manage alarms on your iPhone
Kind regards.