Drink a lot of water and take some advil/tylenol before you go to bed. sleep and darkness help as well. It’s very true that one of the many causes of headaches in general is dehydration.
i’m no expert, but in the past, this has worked for me. :)
The best cure is prevention. Don’t drink more than you can handle, don’t drink on an empty stomach, don’t mix different types of alcohol, drink lots of water. If it’s too late for that, get plenty of rest.