(Lansing State Journal, Feb. 19 1997)
Note (21 May 2012): it has been pointed out that the following article may be slightly misleading. There should be a stronger distinction between "sleeping" and "dozing". Horses cannot stand up during true REM sleep, but may stand for considerable lengths of time while in a "slow wave" sleep state referred to in the article as "dozing" (which term is not intended to cover all modes of sleep; see references below).
If we humans fall asleep while standing up, we would fall down as soon as our muscles relaxed, and falling down tends to wake us up, right? The fact is that in order to remain standing you must keep certain muscles tense, and you must be conscious to keep control over those muscles. When we fall asleep, that conscious control is sort of disconnected, and therefore we cannot remain standing.
While horses may lay down to sleep, they can also doze while standing up. So how do they do it?
The answer is that horses have evolved to have something called a "stay apparatus". This is a system of tendons and ligaments that hold a horse in the standing position while its muscles relax, like a plant hanger holds up a hanging plant. Horses also use their stay apparatus while they're awake to minimize fatigue due to standing. In fact, horses can stay standing for up to three years without showing signs of fatigue!
In the front leg, the stay apparatus is always in place and a horse need only relax to take advantage of it. However, in order to use the stay apparatus in the hind leg, a horse must rotate its hip and literally hook one bone up over a knob on another bone. In some cases the patella can get locked in the hooked position and the animal will be unable to release it. This problem can be fixed with a simple operation.