Further, just how common were such sanatorium stays? Is literature over-representative of them, or were they indeed common -- and for what class of persons were they common, or even an option?
Wonderful question! The sanatorium movement lasted for almost a century and was adopted in varying forms by pretty much every society on the planet, so you can imagine there was considerable variation in what care there looked like. I'm going to narrow my focus to early sanatorium based on the German model, and then the later American models. So the first sanatorium was started by Hermann Brehmer in 1859 at Gorbersdorf in Silesia. In order to understand why Brehmer though this MIGHT work to treat tuberculosis (or consumption), I need to talk a little bit about the medical debate on the cause of consumption. In the early 19th century, members of the Paris Clinical School, notably Laennec and Bayle, had essentially described tuberculosis in its modern form (though they were unaware of MTB as the causative agent, of course) -- a multi-system disease of which the tubercle was the defining feature. French and Southern European (especially Italian) doctors had run with this description, and furthermore posited that consumption was spread by contact (miasma in particular). They were the first to argue for consumptive wards.
However, German and English speaking countries had largely rejected this view (for a majority of reasons, some of them quite reasonable) and felt that many of the changes in extrapulmonary TB were a common endgame of a variety of different diseases. Because of this, they argued that there was a consumptive diathesis -- that is, TB is NOT contagious, but rather there are common factors that lend to TB clustering together. Brehmer reviewed data (which we now know is not true) that suggested that people living at high elevations had virtually no tuberculosis, and ergo developed his sanatorium.
This sanatorium was essentially comprised of rustic chalets, where the wealthy patients would take ambling walks through walking paths that Brehmer cut, eat very large, nutritious meals, and receive hydrotherapy. A fun fact -- Brehmer was quite the outdoorsman, though his patients naturally couldn't walk very far. He would therefore construct frequent benches and gentle switchbacks. These would be copied by future sanatoria, and would directly influence the parks movement in the second half of the nineteenth century. So Central Park, for example, is influenced by early sanatoria!
Brehmer's sanatorium was a failure, since the Prussian government refused to support him (he was a liberal and agitated for a constitutional state). However, he attracted vibrant followers, especially Dettweiller, who traveled across Europe and the Americas spreading the gospel of sanatoria. These mid 19th century sanatoria are probably what are stuck the most in the public consciousness -- Nordrach in Germany, and Davos in Switzerland, comfortable healing with gentle walks, mountain air, a rich diet -- and of course, alcohol-fueled parties (think the Magic Mountain). The other thing I should point out is that heavy doses of cod liver oil would be used liberally, which apparently did not taste very good.
The movement likewise spread to the United States with Edward Trudeau, a young physician who went out to Lake Saranac expecting to die of TB, but found himself miraculously healed. He started his "Little Red Cottage" initially following Dettweiller's model. But this was 1885, and the science had started to move forward on tuberculosis. Most notably, of course, Koch has described the tuberculous bacillus, and overnight old models of the disease had been thrown out the window -- and most notably, there was now a test to stain for the organism in sputum. This had led cities across the world to developed consumptive hospitals to separate the very infectious, and also to lead large scale public health interventions against public spitting. Many of these hospitals were essentially places for patients to die.
But Trudeau taught himself staining, and combined clinical microbiology with his new sanatorium. He would track the amount of MTB in the sputum of his patients, and could demonstrate clearance. His sanatarium could objectively demonstrate cure. The public clamored for access to sanataria, and the government and philanthropists answered -- by 1938, there were 839 sanataria in the US, capable of caring of 136,000 patients at any one time.
What was life like in a sanatorium for "average" people? (that is, not the super rich at Davos, or the early German sanatoria?) In a word -- rigid. William Osler would write, “A rigid regime, a life of rules and regulations, a dominant will on the part of the doctor, willing obedience on the part of the patient and friends—these are necessary in the successful treatment of tuberculosis.” There would be initial bed rest, then graduated exercise, gradually becoming more intense. There would be large meals of bland food, and lots and lots of cod liver oil. There would be frequent vitals checks (ie, rectal thermometry). And patients would be expected to listen to EVERYTHING the doctors and nurses said. There were frequent "against medical advice" discharges. And in the UK, some sanatoria took on the appearance of labor camps, with patients actually constructing the grounds and they improved. As the 20th century progressed, more and more medical therapries would be introduced -- sputum testing, of course, but also x-rays, artificial pneumothorax (lung collapse therapy) and direct resection of the tubercles.