Does staying hydrated help alleviate headaches for some people?

Does staying hydrated help alleviate headaches for some people?