Mann's fictional sanatorium, the Berghof, is probably modelled on the Schatzalp, a mansion reachable only by foot or funicular, which today is a hotel.
The Quakers were using it in Philadelphia in Ben Franklin's time. A man who visited a Quaker sanatorium in 1774 was shocked to see that the patients who were mentally ill were busy spinning flax.