It might be nice to doze off while waiting in the checkout line at the grocery store, but unlike horses, humans cannot sleep standing up. Having evolved to flee in an instant, horses are equipped with a “stay apparatus” that allows them to remain upright for long periods of time. But this mechanism isn’t foolproof and sometimes it causes more harm than good.

Gerald Pijanowski, DVM, PhD, a professor of bioengineering and biosciences at the University of Illinois College of Veterinary Medicine in Urbana, notes that although horses may look like they are in a deep sleep while standing, “they really are just resting.” In order to truly fall asleep, horses need to lie down either on their sternum (breastbone) or their side. This is because to go into REM (rapid eye movement) sleep, they must have relaxed muscles, which cannot happen when they are standing.

“In order to maintain a standing position in the hindlimb horses must prevent flexing of the stifle, maintain extension of the hock, and prevent overextension of the digital joints,” explained Pijanowski. In short, there are several steps that happen at once to allow a horse’s hindlimb to lock, and it all starts with lifting the patella (kneecap) over a bony ridge on the end of the femur (thigh bone). By activating the stay apparatus in one hind leg, that leg can bear the brunt of the hindquarter weight, allowing the horse to rest the opposite leg with just the tip of the hoof resting on the ground.

While the idea of a human popping their kneecap out of place to rest standing sounds painful, it certainly does not seem to bother horses.

But this mechanism,