Every morning at 5.45am, 27-year-old fashion designer Kelly Walker wakes up and begins her morning commute. First, she makes an hour-long trip from south London to central London to attend a boutique fitness studio – F45 Training, a high-intensity import from Australia with a cult-like following. She takes the 7am class, then heads to the tube and travels for another hour to her office in west London to be at her desk for 9am.

“It’s a tour of London!” Walker laughs. And it is one she has been making for the past 18 months. What makes her willing to add two hours on to her commute to go to a gym? Mostly, it’s the buzz of working out with friends. Her housemate and two friends also attend. “It’s good because you actually get up to go. It makes it more enjoyable,” Walker says. “Even though it makes no sense practically.”

Traditionally, British socialising revolved around the two Bs: boozing and bitching about the weather. But now a third B is muscling in: boutique gyms. While a jog around the park or a monthly Zumba class is far cheaper, fitness fanatics with disposable cash can now spend it on interval training in LED-lit rooms with more sparkle than Studio 54.

In fact, for some, the gym is replacing boozing. Young people are drinking less than ever before: according to one survey, more than a quarter of 16- to 24-year-olds are teetotal. A quarter of pubs have closed in the past 35 years, and those that survive largely do so through their food offerings.

In contrast, gyms are booming. The UK private health and fitness market is now worth £3.2bn after growing 20% between 2015 and 2018, according to Mintel. Adjunct industries, such as sports nutrition and athleisure clothing, are also bulking up (the sports food and drink industry grew by 11.5% to £77m in 2017-18). Fifteen per cent of the UK population has a gym membership, and that doesn’t include the premium, pay-as-you-go studios such as Frame, F45 and Psycle that are springing up.

This autumn, a US import, the sweat crawl, will arrive in the UK. Run by the fitness class review site Sweat Concierge, sweat crawls are pub crawls for gyms. “I wanted to create a social experience where people could come for a day with their friends and take three 30-minute classes, back to back, at different studios,” explains the founder, Victoria Scott. The $75 (£57) concept sells: Scott has run sweat crawls in Boston, New York and Washington DC for hundreds of people (90% of them women).

In the bar post-workout. Photograph: Christopher Thomond/The Guardian

Scott credits our health-conscious times for the success of her concept. “I think the bar and brunch thing is going away,” she says. “People are making decisions to do things that are healthier, rather than spending their weekends eating and drinking.”

Exercise classes are already replacing a night out for some. I spent a recent Thursday evening in Trib3, a boutique gym in Sheffield, pounding a treadmill. Around me, a packed, mostly female group tackles a 35-minute HIIT (high-intensity interval training) class. This isn’t a regular class. A DJ in a baseball cap plays dancehall classics while disco lights rotate around the room. My heart-rate monitor compares my progress to the rest of the class. As I blink sweat out of my eyes and my vision blurs, I glance up to see that my heart rate is at 92%. Usually when I feel dizzy in a darkened room with pounding music, I’m in a nightclub. But why bother when you can have the same experience in a half-hour workout, and it is good for you?

After class, there are waiting glasses of prosecco in the bar. For 38-year-old Vicky Sampson, party workouts such as these are a way to have all the fun but none of the guilt of a drinking session. “You don’t have a hangover the next day, and it’s better for you than going to the pub. Especially how Trib3 does it. It feels more like you’re in a disco.”

Another class member, 27-year-old dentist Rihanna Fulford, says: “Three years ago, if you’d told me, ‘You’ll make loads of friends at the gym,’ I’d have laughed at you.” Now, Fulford says, she is a convert, regularly taking back-to-back HIIT classes. She is endearingly self-aware about her conversion. “I used to laugh at people in gyms,” she admits. Now she exercises nine times a week and is going to a spa next weekend with a friend from the gym. “I even came here on Boxing Day in a Santa outfit, still drunk with half a bottle of Baileys in me,” she says. “It was wonderful.”

The new generation of gym-lovers treats exercise the same as everything else in their lives: as something to be shared online. “Instagram has redefined fitness,” 26-year-old Alice Hayes tells me over breakfast in an east London cafe. She scrolls through her feed, showing me her favourite influencers. “I love Lawrence Price [@fatfitsake, 27k followers],” she says. “He’s very credible.”

Hayes, a PR manager specialising in fitness, recently joined Instagram to share pictures of her workouts. To her surprise, it has become a valuable networking tool. “People see your workouts and message you and say: ‘Can we train together?’,” Hayes says. “It’s weird how many people you meet.”

Working out under the disco lights. Photograph: Christopher Thomond/The Guardian

Mintel’s Helen Fricker says: “It’s a lot easier for young people to get information about health and fitness through social media. You can learn about trends almost instantly, and they spread really quickly.” From fitness influencers such as Adrienne Herbert, who was recently named the “face of wellness” by British Vogue, to the social media goliath Kayla Itsines, who has 9.9 million Instagram followers and an estimated net worth ofA$63m (£35.5m), social media reinforces and refracts our new obsession.

Workout trends such as CrossFit or F45 tend to arrive in the UK from the fitness epicentres of Australia or Los Angeles. Alongside social media, private investors help to spread them across the country.

“People say we’re the Soho House of the fitness world,” says Deborah Hughes of Third Space, a private member’s club-cum-gym in London. The pricy membership is about £140 a month. For that, you can make like an elite athlete and have your body fat scanned and, for an extra fee, your blood checked.

I follow Hughes through a maze of rooms (a reformer pilates studio that looks like a sex dungeon! A boxing gym! A medical centre staffed by Harley Street doctors!). We go into a hypoxic chamber that mimics the conditions of training at altitude.

We stand on a Perspex-tiled gym floor and gaze down at a swimming pool full of beautiful people. “We feel superclubs nowadays mean gyms, not nightclubs,” Hughes explains. “Millennials aren’t drinking in bars and clubs after work. They’re here until 11 at night.” Thursday evenings – formerly prime after-work drinking time – are among Third Space’s busiest, up 12% in the past two years. “It used to be that nightimes were dead for gyms,” says Hughes. “Not any more.”

It is all absurd, but everything aspirational is absurd: if Sex and the City were written today, Carrie and co would relocate from cocktail bars to boutique gyms. And something in the Aesop-scented air is catching. I find myself calculating whether I can afford to join Third Space’s new Fenchurch Street club (I cannot).

Making friends after class. Photograph: Christopher Thomond/The Guardian

Private investors continue to funnel money into the sector. The upscale gym brand Equinox will open its first hotel in New York in 2019. In the UK, Third Space – backed by the private equity firm Encore Capital – is planning a £50m, five-year expansion. Several luxury pay-as-you-go studios have opened new London venues this year, including Frame, Boom Cycle, Ten, Digme Fitness and Barrecore.

“We’ve seen a massive explosion of boutique gym operators entering the UK market,” says Richard Griston of Knight Frank estate agents. “I had a studio in Marylebone where an international brand was willing to offer £80 a square foot. It was crazy.”

Some fear the industry could be heading for a crash. “My word of caution is on the rents,” Griston says. He references restaurant chains that were also pumped full of private equity money – such as Carluccio’s, Jamie’s Italian and Prezzo – and are struggling. “People paid huge amounts of money and it has come back to bite them because it wasn’t sustainable.”

Industry burnout or not, the normalisation of fitness as a social activity shows no sign of slowing down. But some early adopters are taking things easier. Days after we speak, Walker gets in touch to tell me she has quit her gym. “The commute got a bit much,” she says. “I’ve found a gym closer to my office that I’ll be doing on my own.” Something tells me that Walker won’t be working out on her own for long.