“Legs up” is a common self-treatment and used to prevent exercise-associated collapse in medical tents around the world. There are other reasons for collapse like heat stroke, hyponatremia, and cardiac arrest; fortunately these conditions are relatively rare.
At our local marathon, we use chaise longues to elevate the legs. We place a runner’s head at the foot end of the lounger and the runner’s legs at the head end. We raise the head end and lock the legs in an elevated position, gradually lowering the angle until the runner can lie flat and eventually sit without symptoms. It beats lying on the ground next to a tree, especially when the temperatures are low.