The capacity of feeds and forages to counteract changes in gastric pH (their buffering capacity) plays an important role in the prevention of gastric ulcers in horses. Alfalfa hay has been shown to be more effective in reducing the severity of ulcers in horses by providing superior buffering capacity compared to grass hay.

Gastric ulcers are common in performance horses, affecting more than 90% of racehorses and 60% of show horses. Most ulcers occur in the upper portion of the horse's stomach and are primarily the result of prolonged exposure of this tissue to gastric acid. The upper half of the equine stomach does not have a mucous layer and does not secrete bicarbonate onto its surface (which is the process by which the rest of the stomach is protected from ulcers). The only protection this portion of the stomach has from the ulcer causing agents gastric acid and pepsin comes from saliva production and the buffering capacity of feed.

The "epidemic" of ulcers seen in performance horses is a man-made problem resulting from the way equine athletes tend to be fed and managed (ulcers are much less prevalent in unexercised horses maintained solely on pasture). Meals of grain or extended periods of fasting lead to excessive gastric acid output without adequate saliva production.

Additionally, production of volatile fatty acids (VFAs), particularly butyric acid from the fermentation of grain in the stomach makes the upper portion of the stomach more susceptible to acid damage.

Horses secrete acid continuously whether or not they are fed. The pH of gastric fluid in horses withheld from feed for several hours has consistently been measured