Can horses rest standing up?

Yes, this can actually be vital to their survival. Although horses lay down on occasions, they are very vulnerable in this position, even when rolling on the ground. It will take a horse vital seconds to regain its feet - long enough for it to be knocked off-balance and killed by a large predator.

Standing also has the advantage that it gives good visibility, making it less likely that the horse could be ambushed, but remaining in this position for any length of time leads to weary legs and sore feet. As a result, the horse has evolved the so-called stay apparatus, an arrangement affecting the muscles of its limbs which enables it to rest each leg in turn, without adversely affecting its balance.
If threatened though, the horse can then start running immediately, and in the wild, this could save its life.