The first thing to do is check your app permissions, because often an app has the permission to "wake the device" or "disable screen lock" without you realizing it. It's not something you see right away in normal settings - you have to go to Settings > Apps > Permissions and check who has access to "Device and identity" or "Power on and off". Xiaomi is particular because it keeps a lot of things hidden.
The real problem that the other answers haven't mentioned is a feature called "Lift to wake" or "Double tap to wake" (the name changes between MIUI versions), which sometimes turns itself on during software updates or because of weird bugs. Go to Settings > Lock screen and notifications > Lock screen, scroll down and look for any option that talks about "activation" or "motion". If you find something, disable it.
One last thing: check if you're connected to a smartwatch or some other wearable device that could be waking up your phone to sync at night. It happens more often than you'd think, especially with budget watches that have weird syncing algorithms. If none of this works, try backing up and doing a factory reset on your phone, because it could be a system data corruption issue.