ETOH or ethanol prevents the body from releasing ADH (Anti-Diuretic Hormone or Vasopressin) from the pituitary gland. ADH is normally released by the body as a major pathway of reabsorbing water within the kidneys. Inhibition of this hormone is one of the major contributing factors to dehydration with Etoh ingestion.
Many factors can come into play such as, current hydration status, and total amount of etoh ingested. Your body also uses water to metabolize etoh, and draws it away from available resources further contributing to a dehydration issue.
The best advice i can give it to have a glass of water after every beer. I know it sounds retarded, and you'll be pissing a lot, but it will help to further prevent a dehydrated state.
Before bed, it's absolutely paramount to replace lost electrolytes and B vitamins. Many B vitamins are used up an poorly absorbed due to etoh ingestion. I recommend a b-complex formulation before bed. Replacing sodium/glucose helps your body to retain its hydration status and prevent the situation from becoming worse. Gatorade to the rescue!