After his divorce, Mr. Owens, who teaches middle school math, lived in this apartment with two other men. He took the living room for himself and put up bookshelves as a divider. His current roommate is about to move out, which has left him at something of a real estate crossroads.

“I was talking to a friend of mine, trying to figure out what to do with the place, and he said, ‘If you want to, come live with us,’” Mr. Owens said. “He’s in late 20s, and I’d be one of four. The other guys are 26, 28, 31. Then, 41. We all get along, but one of these things is not like the other.”

Mr. Owens recalled that when his marriage ended, he found himself out of step with men his age.

“When you first arrive here in your late 20s, you have tons of people in the same situation you’re in,” he said. “But now you ask yourself: ‘Am I going to live a 20-year-old life or a 30-year-old life? Am I supposed to be doing that at my age?’”

Jon Derengowski, 31, a television script coordinator, found himself in a similar situation after a breakup. Now he lives in a rent-stabilized apartment in Greenpoint, Brooklyn, where he has lived with nine different people since 2008. But one of those people was his longtime boyfriend. When the relationship ended, after a year and a half, he had to replace his partner with a stranger who could help with the rent.

“Maybe it’s not depression, but there’s definitely a bit of self-criticism that sets in,” Mr. Derengowski said of the period after his boyfriend’s departure. “You’ve hit this very defined point on the trajectory that most people agree is the right thing to be doing, and then you’re not there anymore.”

Even though he gets along with his roommates, Mr. Derengowski said he does not necessarily want to see someone sitting on the couch when he gets home from work.