The rapidly growing business is catering to the swelling class of affluent Chinese women, who, like millions of new mothers across the country every year, continue to follow the practice prescribed by their ancestors. But decades of disposable income, busy careers and the rise of social media have loosened traditional attitudes, paving the way for an elite level of confinement care that is as much about status as recuperation.

“I haven’t been bored for a second,” Ms. Li, 31, said of her 29 days indoors, as her nanny draped a towel over her neck to ward off the air-conditioned chill. Ms. Li paid $27,000 for her monthlong confinement at Red Wall Maternity Care Center. “Without this type of specialized care, I would never have been able to recuperate.”

In major cities, wealthy families have access to a range of high-end services with spalike features and fancy amenities. The number of maternity residences reached 700 in 2013 and generated an estimated $484 million in revenue, according to state media.

“Mothers don’t want to do confinement the primitive way anymore,” said Chen Chen, the manager at the Red Wall maternity center in Beijing. The center charges $11,000 to $27,000 for a monthlong stay, depending on the services.