I have been struggling with sleep for 2years

I always wake up twice every day. Often 2am and 5am. I don't even know how it began. I somehow wake up for various reasons like cold, hot, discomfort, thirsty etc. After waking up I go to kitchen and drink a cup of water than take piss. I have no problem going back to sleep but it made me constantly exhausted. I gotta break this pattern but I don't know how.