I imagine medical corsetry has been around as long as corsets, because as soon as people notice the benefits of something, they tend to highlight it. But the earliest resources I've seen for it are Elizabethian. The most common prescription is for spinal irregularities - everything from a "weak back" to scoliosis. For our purposes, though...
Corsets compress the abdominal wall, which takes pressure off the lower back and spine. So medical corsets can be used for posture support, to alleviate back, shoulder, knee, foot, and leg pain; to support the spine and strengthen muscles after accidents or injuries, for support and control of neurological and autoimmune disorders, to prevent back injury, to protect organs during riding or hunting, and so on. This is an article on "
How Corsets Heal", which goes into more detail about that and how it works. While it's addressed from a modern standpoint, people in the early 19th century would have no doubt been aware of these benefits as well. Andy Warhol wore a corset throughout the latter half of his life after a assassination attempt left him with a severely injured back.
That article also talks about postpartum "abdominal wrapping" to strengthen the abdominal wall, which can be weakened or damaged during pregnancy. While this has been done in India for centuries, it wasn't a common practice in Europe until the 20th century, but I have no doubt women would have noticed the effects of wearing corsets after pregnancy anyhow. There are pregnancy corsets too, the earliest of which I've seen is a mid-18th century patent.
The Met has a "early 19th century" (which elsewhere I've seen dated as 1810) cotton medical corset
here. Something like this would be for an adult male, probably someone with a weak back, problems with posture, or for support. I also have an image of a 18th century leather corset
here, another pretty painful looking one from about the same time
here, and if you google medical corsets, you'll find some of the wooden and metal ones they used on children from the mid-19th century to the mid-20th century in order to correct spinal deformities. I've also found a patent for a male corset to prevent onanism (which is to say, self-touching of the variety that Victorian parents would not approve of), which I'm not including because 1) it's after our time and 2) it weirds me out. XD