Yes, making lifestyle changes, such as reducing stress, staying hydrated, and avoiding trigger foods and drinks, can help to prevent headaches from occurring.