Loads of things you can do to avoid or reduce frequency of attacks, mostly relating to diet.
Worst triggers for me are shellfish and beef (high purine content) and bottle conditioned ale.
Other contributing factors include injury, like stubbing a toe, or dropping something on my foot.
But by far the most obvious cause, in my case is dehydration.
Basically you need to find what’s causing your’s, and either cut it out or reduce it sufficiently. Unfortunately it usually ends up being the item of food and/or drink that you’ll miss the most.