When selecting an apartment/home, minimize the obstacles and distance between bedrooms and bathrooms so that you can stay mostly asleep if you need to pee in the middle of the night. Especially avoid stairs — which is also key to being able to age-in-place (or be able to bring an aging parent into your home for even short stints).
(Note: if you’re a dude, it might make sense to pee in a bottle during the night. But you should still keep the ladies in your life in mind.)
I say more about all this in the section on sleep on the Health & Wellness page