It was age catching up with me that got me into cycling. Or rather, it was age overtaking me, speeding ahead and leaving me in the dust.

In the spring of 2010, I found myself on a 60-mile (97km) ride from the leafy New York suburb of Pound Ridge to Manhattan, with a “super commuter” in his mid-50s, whom I was profiling for a story on how cyclists and drivers get along (or don’t) on the roads. I was a casual cyclist then, and showed up on a “hybrid” bike with flat pedals and trainers. My companion, on a road bike with clip-in pedals, tried to hide his apprehension behind a smile. “Oh, you didn’t bring any water?” he asked. I fancied myself fit, but this man, some ten years my senior, kept disappearing down the road. What I had envisioned as an easy-going romp through the countryside became a teeth-grinding fight to hang on.

One expects a midlife crisis to be rooted in the reversal of chronology – trying to act again like one’s younger self; feeling the challenge from a brash upstart at work; eyeing some fetching, vernal oblivious-to-you creature on the subway. My existential wake-up call came from the other direction: a man with a greying beard who was eligible for membership of the American Association of Retired Persons. I had come to a fork in the road: either I could project from my present self a decade of slow decay; or, in ten years’ time, I could be like that man, now.

I got into the saddle. I bought a proper road bike and set out learning how to ride it properly – how to pause at traffic lights without “unclipping”; how to ride calmly inches from someone’s wheel at 30mph; how to pedal consistently through corners. There were vast hills to climb, figuratively and otherwise. On an early outing with sensei Matt Seaton (author of “The Escape Artist”, a cycling memoir), I was forced off the bike three-quarters of the way up a popular climb just outside Manhattan. He consoled me, saying that not only would I someday easily ascend in one go, I would – by my own volition! – spend my Saturday mornings riding up and down it multiple times. As ever, age kept haunting me: at my first time trial, I finished behind a friend who was almost 70.

I fell hard. My progression was like a movie montage, a string of dramatic moments flashing by to the accompaniment of an infectious beat. I joined a race team and began a rigorous training programme that featured, as a kind of ritual penance, a “lactic threshold test”, which measured how much effort I could exert before my muscles began to flood with acid – a Torquemadan exercise that involved cycling progressively harder on a stationary bike in a dimly lit gym while someone drew blood samples from my fingertips. I was soon cycling through pre-dawn streets on Saturday mornings to Central Park races, passing teetering twenty-somethings coming home from clubs; or dodging illegal taxis as I returned from the old Floyd Bennett airfield, whose cracked, wind-blown former runway served as a makeshift race course.

It was a bit terrifying (they say there are three types of riders: those who have crashed, those who are crashing and those who will crash). But it was also immensely magical. I have no memory at all of when I first tried to drive a car, but I could tell you down to the weather what it was like when I first rode my first real bike (a yellow Schwinn). The bike was the first thing to give you freedom; the car merely extended it. And when a car became just another payment to make, the bike brought renewed freedom. Where else in life were you free to act like a kid again, even, as a friend put it, to “put on a superhero costume”.

I had become, to use a phrase devised by the marketing consultancy Mintel, a Middle-Aged Man in Lycra (or MAMIL ). It was an identifiable psychographic (broadsheet readers, Waitrose shoppers) and a reductive caricature brimming with condescension (we were vain, we were hopeless, we should just grow up already and get a BMW ). Not all of that is untrue.

AND AT A TIME WHEN MY EARNING POTENTIAL HAD PEAKED, IN THE FULL FLUSH OF FATHERHOOD, WHEN ONE’S POSSIBLE LIFE PATHS FELT LIKE THEY WERE BEGINNING TO NARROW, CYCLING OPENED UP NEW GEOGRAPHIC AND PSYCHIC VISTAS

And yet. Cycling seemed to arrive, at a critical juncture, to fill in any number of life’s satisfaction gaps. There was the raw fitness, as my waist revisited sizes it had last seen in the first Bush administration. There was a wider sense of quantifiable achievement – the faster times, the progression up the hierarchy of racing categories – than in my day job as a writer, where I push atoms around and am constantly haunted by imposter syndrome. The bike itself suited my need to do something tangible with my hands, at a time when changing a filter in one’s car requires a computer code. Cycling provided a way to meet new friends (of both sexes), something that middle-aged men in particular are often presumed to be beyond wanting. It even seemed to have a professional benefit. “Cycling is the new golf” goes the cliché, and on coffee-shop rides I was meeting a broader range of people – everyone from senior executives at big financial firms to airline pilots to male models – than in my life off the bike. I got more employment from Strava (the “social network for athletes”) than LinkedIn.

And at a time when my earning potential had peaked, in the full flush of fatherhood, when one’s possible paths in life felt like they were beginning to narrow, cycling opened new geographic and psychic vistas. My cycling career coincided, perhaps not coincidentally, with the birth of my daughter. It may be little wonder my wife eventually got a contract to write a book entitled “How to Not Hate Your Husband after Kids”. In my defence, she was told by Helen Fisher, a noted anthropologist, that, in taking up cycling, I may have been trying to regain testosterone lost after the baby was born; or even, as an older parent, subconsciously trying to ensure I would be around longer.

Cycling was like a sudden third wheel. I would test my wife’s tolerance with my vacation suggestions (“I hear Mont Ventoux is lovely at that time of year”), or my rationale for needing an additional bike for gravel roads. I trashed bike-shop receipts like they were Ashley Madison bookmarks (I heard of someone who always bought black bikes, so his partner would be less likely to notice that his old one had been replaced). Time away from home on a training ride became exponentially more fraught with each passing hour. A friend told us that he had returned from an “epic ride” to find his wife had put her wedding band on the kitchen table.

My kind of conversion story is scarcely rare. Julian Bleecker, a 49-year-old designer at Nokia who lives in Los Angeles, told me how, scarcely more than a year ago, he had entered a 24-hour race in Tucson on a whim. He first had to buy a bike. He describes himself as “not particularly athletic” and talks about the “spirit of fellowship” he felt with his friends on training rides, a feeling that was “so much more visceral” than being on a team at work. At the Tucson race, in the middle of the night, he felt a sensation of intense giddiness when, on a curve, he looked back “and saw that string of lights dotting out the hill. This city’s that’s popped up – we’re all out here.” People might say, he admitted, “you idiots, why are you out here in the desert, riding around in a circle? On the other hand, it was amazing.” Soon after, he quit his job and launched a startup called Omata, designing premium instruments for bikes.

All the while, I had been struck by the age tilt of cycling. Sure, I had ridden with lithe teenagers and raced people half my age. But go anywhere serious cyclists congregate – Tucson’s Le Buzz Café, the Runcible Spoon in Nyack, NY , the Eroica ride in Italy – and it can look like a Viagra advertisement. A story I often heard was of someone coming to cycling from some other activity, such as running, that was proving too hard on ageing joints. Or else the kids were off to college and weekends suddenly yawned like a chasm.

Get back on your bike A rider soaks up the Californian sun

I put the question to Derrick Lewis, who heads US communications for Rapha, a talismanic London-based cycling-clothing company. He noted the high barriers to entry – a good road bike starts at $1,000 (and a full Rapha winter ensemble, he might have added, can set you back close to that). “It perhaps takes a little age to enjoy the sport,” he speculated. He’d have laughed if someone had told him ten years ago that he would be “going out for three hours on an empty road where the wind is blowing in my face, and sort of mindlessly pedal this bike, that’s rather uncomfortable on my ass, and my legs are burning, and that’s what I’m going to like about it.” A 22-year-old, he reckoned, would have a hard time seeing the excitement in that.

Not surprisingly, Rapha’s customer base is getting older: two years ago the average age was 39; now it is 41. Other companies’ customers are similarly middle-aged. Uli Fluhme, a former Wall Street attorney who six years ago launched the Gran Fondo New York – an Italian-inspired race that has since surged into a series of global franchises, with Indonesia due to be added next year – notes that the average age at his New York event is “in the early 40s”.

Both Rapha and Fluhme’s Gran Fondo are tapping into a similar demographic: riders who think themselves too old to queue up and, as Lewis puts it, “go elbow to elbow in an office-park criterium” – a flat-out inner-city race – with all the cost, risk and training that entails. Rapha, he says, wanted, through its clothing, “to give you permission to be very serious about riding your bicycle,” without necessarily donning a garish team kit and pinning on a number. As Fluhme, an Ironman and longtime racer, notes, people of any age can compete in marathons or triathlons, but criterium racing is not for the over-35s. “It’s so hard-core [and] full-on. You have to train 10,000 miles a year just to be able to hang on at the beginning.” The Gran Fondo, he says, brought the inclusivity of marathons – “people who just want to finish it, and at the front you have the Kenyans who want to win it” – to cycling.

I could relate to this larger narrative of cycling “softening” as it began to skew slightly older. For I too had to leave racing behind. I was having trouble finding the time, maintaining the intensity (racing against your peers gets harder as you get older, because of a selection bias that means anyone who still remains will be deadly serious). I was in a weird limbo: not able to keep up with the elite pack, but always wanting to drop the “Freds” (as less seasoned riders are dubbed) who tried to keep up. How could I scratch all those itches – adventure, physical hardship, camaraderie, competition – in ways that were more salubrious than training five days a week in order to race around loops in a frantic, jostling, buzzing pack of 45 riders, trying not to be brought down by a wavering wheel or an errant dog on a leash? Lewis suggested I might go on the road with Rapha.

As I sit talking to Brad Sauber, director of Rapha Travel, in the sun-lit courtyard of San Francisco’s Inn at the Presidio, the word “pain” has come up so often that I feel like I’m at a sadomasochism conference. He is telling me about the company’s Cent Cols Challenge, a ten-day trip across 100 European hills. “That is meant to break you,” he says. “Out of 30 riders, fewer than ten complete it.” People willingly shell out thousands of dollars for this treatment. “They know that we suffer on a bike, that we like to ride hard. They’re going to get that.”

Thankfully, my task was somewhat easier. I had come for a “Rapha Randonnée”, a four-day trip, from San Francisco to Santa Barbara, covering 455 miles and 42,729 vertical feet of climbing. In late January, after a winter marked more by binge-watching than interval training, I hardly felt ready for it, but it was the only window in my schedule. My companions were a trio of friends from Monterrey, Mexico, who inevitably dub themselves “The Three Amigos”, nominating me as honorary fourth. Most Rapha trips would be closer to a dozen riders but a spate of boisterous El Niño weather has prompted cancellations.

Sauber, who has been in bicycle travel for several decades, has seen the age dynamic play out slightly differently. In the early 1980s, he says, the bicycle-driven “adventure travel” business took off, driven largely by recent empty-nesters. For a while, all was simple. But then that demographic began to age. “Those companies had to soften their offerings,” Sauber says. “People started doing shorter trips, hiking trips, multi-sport trips – they even have electric bikes.” The quintessential marketing image, he says, became “50-year-old couples on a hybrid kissing in the Loire Valley”.

As that softening happened, a new market arose. “I started seeing a rise, mainly in 30- to 40-year-old men, coming into this space.” A sociologist might call it the “international endurance class”: a group of moneyed people who signalled their wealth less with traditional luxury trappings than with finishing times at Kona, where the Ironman World Championship is held. “They’re all quite Type A, they all want to ride their ass off. They all want a challenge.” At the same time, he says, “they want to stay in decent places, have a nice bottle of wine and great food.” Boutique outfitters like inGamba and DuVine arose from the proposition that if you could not quite ride like a pro, you could be treated like one.

And so after a decade of business, Rapha decided to enter travel. The promise was that civilians could tap into the mystique of the company’s marketing campaigns – gorgeously shot films that tended to feature sombre-looking, austerely dressed riders on wind-blasted fjords. Rapha ingeniously fathomed a market that did not exist, an imagined fusion of the golden age of European bike-racing with a looser style of American adventure cycling – Fausto Coppi let loose among a group of Portland hipsters. Like Karl Ove Knausgaard’s “My Struggle”, Rapha commercials take the most banal, everyday occurrences – washing sweaty kit in a cheap motel – and infuse them with poignant grandeur (and, like Knausgaard, people either love it or roll their eyes).

Ben Lieberson, a plucky north Londoner now living in Los Angeles, is one of those iconic Rapha faces – etched with sympathetic character – and our guide on the trip. “People knock the brand. You know ‘it’s all marketing, these videos are carefully crafted’,” he tells me, the night before our departure. But on a randonnée “stuff starts to happen.” Clients come having “seen all this imagery, all these tough guys, and now it’s your turn to actually do it – and you’re going to have to get off the snowy mountain without enough equipment, or it’s going to be chucking down with rain. There’s no faking it – when you come on the randonnée, you’re really riding 132 miles on day one.”

Which is what we did, pulling out of San Francisco on a brisk morning, hugging the shore on small, twisty roads through the tony enclaves of Pebble Beach and Carmel-by-the-Sea. The Paci­fic Ocean was a constant presence, huge furrows of surf stretched in regular rows as far as the eye could see, like rough threads on a massive loom. The sea made its presence known in other ways: throughout the day, sand from the beach or adjacent dunes blew in the street; at one point a huge dune had formed in the road, forcing us to ferry our bikes by hand.

Caught up at last The author (left) takes a breather with “The Three Amigos”

The spirit was jocular but, as Lieberson put it, “what do you call it when two guys go for a bike ride? A race.” Eager to convince myself that primal “base miles” still lurked in my legs, I pushed hard early, setting a brisk pace at the front and imagining I had the jump on my companions. I should have known better. As I had learned that morning, the three of them – Carlos Sandoval, Pepe de la Garza and Yolanda Iribarren – were all veteran Ironman competitors. While we were all roughly of a similar age, they were disconcertingly smaller than me; with all that climbing to come, I would have to press what I quickly determined was my sole advantage: going downhill. Mass times the acceleration due to gravity – you do the math.

Over the course of the day, as we wound up and down the rolling hills of coastal Highway One, a pattern emerged: Sandoval would gain a lead up a hill; de la Garza would attack; I would try to stick with him; eventually I would fall off, glancing over my shoulder to see Iribarren dauntlessly advancing behind me. With a shot of adrenaline, I would crest the hill and try to rejoin them, tucked into an elaborate aero position.

A day’s worth of this dance left me with little in the tank by the time we approached Monterey. Crossing huge agricultural expanses, draped in the sulphurous aroma of Brussels sprouts, I struggled against a mighty headwind, my body shuddering on the edge of hypoglycaemia. Iribarren and Lieberson gamely escorted my exhausted arrival to Cannery Row. Moments later, I was shivering uncontrollably on the floor of the scalding shower. Still, things were looking up. I had a room with an ocean view, a fire was blazing, and the post-ride masseuse was due shortly. By contrast I had previously been on rides where I suffered on the bike, and then suffered just as much in the after-ride accommodation, bunking with random strangers in budget rooms as our shoes dried on the radiator and a persistent funk insinuated itself everywhere.

“People want to do something that’s outside of their comfort zone,” Lieberson told me at dinner. “And we’re trying to provide the support to do that.” He was full of tales of suffering, like the trip when they rode into a blizzard on the Col de la Bonnette, the legendary pass in the French Alps that is home to one of Europe’s highest paved roads. “It was beautiful, but crazy,” he says. “People were hypothermic.” One client, a US Navy captain (“he’s a tough guy”), was on the ground, unable to go on, shouting semi-coherently “just leave the fucking bike!” Lieberson flagged down a surprised woman in a car, who shepherded the stunned sailor to a café down the mountain. “He got back on the bike that afternoon and finished the ride.”

The next morning, we awoke to heavy rain and a dense fog and gritted our way up huge, twisting coastal climbs on the car-commercial vistas of Highway One, cars a foot away on one side, steep plummets to the crashing ocean a foot away on the other. We were presented with Hobson’s choice: one could either not see by riding with ultra-fogged glasses, or one could not see by ditching the glasses and getting eyefuls of rain and road muck.

Later that afternoon, as the rain finally stopped, and I hastened to make it to the next hotel before sunset, I noted a group of Chinese tourists, not far from Hearst Castle, contentedly watching a huge pod of elephant seals massed in an enclosure near the road. Hunched over the bars, I made eye contact with one of the huge beasts, who lay slouched like Jabba the Hut. Why can’t I be you? I thought, staring into his baleful gaze. Or why, I further reasoned, couldn’t I just be a casual sightseer, gently taking it all in? There is something bizarre, yet intoxicating, in the way cycling juxtaposes these little dramas of pain and suffering amid landscapes of sublime beauty. As Nietzsche wrote in “The Gay Science”, “what if pleasure and displeasure were so tied together that whoever wanted to have as much as possible of one must also have as much as possible of the other?”

It never got easier. In the following days we passed Michael Jackson’s shuttered Neverland Ranch on the way up the legendary Figueroa Mountain, and nodded at viticultural filming locations from “Sideways”, and dropped in for an espresso at Avila Beach. But it did get more satisfying – even, or especially when, I got lost and had to ride an extra hour. Much of it was down to the companionable nature of the quest, as we would nightly recount our shared struggles and joys. We became actors in a drama, each assigned our own roles. Carlos, stern and driven, intent on winning; Pepe, churlish and capricious, always late, always tinkering with his equipment, desperately nipping at Carlos’s heels; “Yoyo” providing comic relief and singing ballads at the back of the peloton. My role became clear at the last night’s dinner when Lieberson gave me a copy of Max Leonard’s “Lanterne Rouge: The Last Man in the Tour de France”. Leonard’s book is a poem to the Sartrean act of not winning the race, and yet somehow, by simply hanging on, not losing it. “Why not simply get off and do something easier and less painful?” Leonard asks. I think the question was rhetorical.■

Tom Vanderbilt was the guest of Rapha Travel. The San Francisco to Santa Barbara Randonnée costs $3,330 for five days, including meals and accommodation.