For ulcer prone horses, the key is to change long-term management to prevent the ulcers to begin with.
24x7 turnout is ideal, but impractical for many people. Give as much turnout as you can, and when the horse is in, keep a small mesh hay net full of hay. The horse's digestive tract is meant to always have small amounts of food moving through it, since (unlike humans) horses' stomachs don't stop producing acid between meals. Keeping food moving through keeps the stomach from getting too acidic.
Next is to keep non-hay meals small, and low NSC. (Read more about grain and ulcers here: Gastric Ulcers in Horses
) If you can avoid grain altogether, do so; you should still feed a ration balancer or vit/min supplement for nutrition, and you can feed other non-grain hard feeds like rice bran, beet pulp, or alfalfa pellets for added calories as needed.
There are a number of digestive support supplements out there, both commercially with products like U-Gard, Succeed, or Neigh Lox, or herbal remedies like Marshmallow root, aloe vera juice, etc. You may find your horse responds well to having these as a regular part of his diet, or may just need them in times of added stress (e.g. A few days before a show until a day or two after he comes back home)
You also want to make sure your horse's stomach is protected before you take him out riding- if he hasn't had hay in front of him, give him a pound or so of hay (or hay pellets) before exercising him so his stomach is buffered. The last thing you want is unbuffered stomach acid sloshing up on the unprotected portion of the stomach!