I have a serious incurable condition that interferes with, among other things, oils and salts in my body. What I have figured out over the past 14-ish years (since getting diagnosed) is that hydration is not just about how much fluid you take in. Just like you can oil something to protect it from water, oil in the body helps keep water in. And salt and other electrolytes also matter.
There are also other brain chemicals involved in helping modulate the waking and sleeping cycle of the brain, chiefly melatonin and co-q-10. I took lots and lots of co-q-10 to heal my sleep disordered brain after getting off the boatload of prescription drugs that fried it and messed up my ability to sleep.
I sleep a lot better than I used to. I am better hydrated than I used to be. But hydration is not merely a matter of drinking water. There are a lot of other chemical things going on there. But I would agree that proper hydration helps (with sleep, brain function, and general lymphatic processes). Water alone does not get you to proper hydration.