The share of U.S. adults reporting no sex in the past year reached an all-time high in 2018, underscoring a three-decade trend line marked by an aging population and higher numbers of unattached people.

But among the 23 percent of adults — or nearly 1 in 4 — who spent the year in a celibate state, a much larger than expected number of them were 20-something men, according to the latest data from the General Social Survey.

Experts who study Americans’ bedroom habits say there are a number of factors driving the Great American Sex Drought. Age is one of them: The 60-and-older demographic climbed from 18 percent of the population in 1996 to 26 percent in 2018, according to the survey. The share reporting no sex has consistently hovered around 50 percent, and because that age group is growing relative to everyone else, it has the net effect of reducing the overall population’s likelihood of having sex.

But changes at the other end of the age spectrum may be playing an even bigger role. The portion of Americans 18 to 29 reporting no sex in the past year more than doubled between 2008 and 2018, to 23 percent.

Jean Twenge, professor of psychology at San Diego State University and author of iGen: Why Today’s Super-Connected Kids Are Growing Up Less Rebellious, More Tolerant, Less Happy — and Completely Unprepared for Adulthood, said in an interview that growing sexlessness among America’s 20-somethings is primarily attributable to partnering up later in life.

“There are more people in their twenties who don’t have a live-in partner,” she said. “So under those circumstances I think less sex is going to happen."

Americans in their 30s, 40s and beyond, meanwhile, are much more likely to be married than those in their 20s. These age groups are now more likely to have sex in a given year than their younger peers.

The data also show a significant gender divide among 20-somethings.

For most of the past three decades, 20-something men and women reported similar rates of sexlessness. But that has changed in recent years. Since 2008, the share of men younger than 30 reporting no sex has nearly tripled, to 28 percent. That’s a much steeper increase than the 8 percentage point increase reported among their female peers.

There are several potential explanations for this, Twenge said. Labor force participation among young men has fallen, particularly in the aftermath of the last recession. Researchers also see a “connection between labor force participation and stable relationships,” she said.

The survey showed, for instance, that 54 percent of unemployed Americans didn’t have a steady romantic partner, compared with 32 percent among the employed.

Young men also are more likely to be living with their parents than young women: In 2014, for instance, 35 percent of men age 18 to 34 were living in their parents’ home, compared with 29 percent of women in that age group. At the risk of stating the obvious, “when you’re living at home it’s probably harder to bring sexual partners into your bedroom,” Twenge said.

One final factor that may be affecting Americans’ sexual habits at all ages is technology. “There are a lot more things to do at 10 o’clock at night now than there were 20 years ago,” Twenge said. “Streaming video, social media, console games, everything else.”

That may speak to the drop-off among the sexually active: The share of people who are having relations once a week or more now sits at 39 percent, compared with 51 percent in 1996.