Waking up multiple times a night to use the bathroom can be frustrating and affect sleep quality. Nocturia, a common condition affecting millions of adults, has various causes including drinking too much liquid before bed, consuming caffeine or alcohol, taking diuretic medications, medical conditions, and habits. To minimize nighttime urination, limit caffeine intake during the day, avoid drinking fluids two hours before bedtime, and wear compression socks to improve fluid distribution.
Source: https://www.cnet.com/health/sleep/are-you-waking-up-to-pee-too-much-how-to-minimize-night-time-urination/#ftag=CAD590a51e