IDK, I personally do something like a 0.5 to 1L of water just before lying down. Takes a little bit of forcing myself, as it's way past satiating immediate thirst or dryness in mouth, but I do it as a calculated measure. It pretty much eliminated headaches for me. I'd still feel like shit the next day - sleepy, groggy, unmotivated - but at least my head wouldn't be ringing.