Stephen King agrees. “Every part of writing a novel is daunting, but very few novelists deal with sex very well,” he wrote in an email. “The act is usually far better than writing (or reading) about the act.”

Perhaps it was better in the old days, he added. “When I was a kid, reading my first adult paperbacks, the guy would take off the gal’s blouse … they would kiss … then there would be a double space, after which the story would resume the following morning.”

Not so much now. As luck would have it, lots of writers are up for writing about sex — even, or maybe especially, when the sex isn’t that good. (With her short story “Cat Person,” Kristen Roupenian has perhaps created a new vernacular for expressing the particular ways it can be not-good for women who think they want it, but who become repelled mid-encounter by the weird or sloppy or selfish or alarming behavior of the men they go home with.)

Indeed, a lot of literary fiction seems to feature glum lovers “who have two reluctant orgasms” before, basically, calling it a night, said Carmen Maria Machado, who relishes a saucy sex scene, especially from the point of view of women who like to have it with other women. “Often I feel when I’m reading sex scenes by men, there’s a sense of disdain for the female body, a sense of its alienness, its otherness,” she said in an interview. “But I like to write about sex,” she continued, “and I feel there’s a real joy to clear, joyful sex.”

The novelist Tom Perrotta said via email that he favors characters who “think and talk about sex all the time, but don’t have a lot of it.” (In his latest book, “Mrs. Fletcher,” his main character mostly sticks to porn.) Meanwhile, Anthony Marra’s story collection “The Tsar of Love and Techno” includes a scene between a pair of desperately-in-love teenagers who have sex as if they were the first to discover it. Their age “allows for a little descriptive leeway, because so much of adolescent life is overwrought to begin with,” Marra said in an email.

Writing with pungent frankness about sex in “Jeff in Venice, Death in Varanasi,” Geoff Dyer was inspired by the lyrical yet matter-of-fact gay eroticism in such Alan Hollinghurst novels as “The Line of Beauty.” “I was struck that he was writing this classical prose and then without any change of register suddenly he was writing in this very explicit, up-to-date way,” Dyer said. “I wondered whether it was possible to do a heterosexual version of that.”

He also wanted to be sure everyone knew who was doing what when, how and to whom. “Generally speaking, I get frustrated and irritated when I can’t tell what’s happening” in a novel, Dyer said. “I want to know who’s speaking and where they’re going and all that.” So for his sex scenes, “I wanted it to be, ‘This goes there and he does this. …’ Just the sort of mechanics of it. It was technically interesting because even moving people around — getting them in and out of rooms — is difficult.”