HOUSTON — Hurricane Harvey’s floodwaters have left this sprawling metropolis partially ruined and eager to return to something like normalcy. But the storm has also forced many thousands of people out of their homes. As a result, the city is engaged in one giant collective improvisation. Its defining creative endeavor is where to find a place to sleep.

Greater Houston is big enough, with enough dry and intact neighborhoods, to absorb many of the people whose own homes are now moldy and wrecked. But absorption is not always easy. The cleanup will take years, and many Houston residents are heading into autumn under unfamiliar roofs. They will be packing school lunches over hotel minibars, and packing themselves into the guest rooms of neighbors and relatives and friends. Some remain stranded in shelters, and others have returned, in desperation, to the stench of unrepaired homes. Here are the stories of five of those people, unmoored from the homes they knew, adrift in a city they know well.

Back home, with incense and mold.

Ricky Gentle burns incense at night, vanilla or lavender, to hide the smell of his moldy apartment. He knows this is no place to stay, that it cannot be healthy to breathe in here, but he and his brother and his brother’s wife have no other place to go. The one night they spent in a shelter — ”people half-crazy going around” — seemed even more dangerous.

The night the flood came, Mr. Gentle, 54, lay in bed and heard the pots and pans clanging in the kitchen cabinets, a signal that waters were rising fast in the apartment. He and his brother helped float the elderly and sick out of the flooding one-story apartment complex on mattresses, breaking into a nearby church for immediate shelter. They came back to the apartment the next day, finding the complex empty but the water mostly gone, other than the raw sewage still sitting in his bathtub. They spent days scrubbing the walls.

“We got to breathe in that stuff and it ain’t no good. But ain’t nothing we can do,” he said.

This is home but an unfamiliar one. Most of the furniture is gone. So are all of his clothes but four T-shirts, three pairs of socks, three pairs of pants and some boxers. They do have a portrait of the brothers’ parents hanging in the empty living room. And the nights here are quiet.

“We just sit here and let the days pass by,” Mr. Gentle said.

In a shelter, amid a sea of strangers.

Marcella Gonzales’s husband went back to work at his warehouse job a few days ago, but they still have nowhere to live, and so Ms. Gonzales spends her days waiting for him at the cavernous George R. Brown Convention Center downtown. Sometimes she waits in front of the big flat screen television with the other Houstonians who have nowhere to go.

More than 10,000 people crowded into the convention center shelter at the height of the crisis. By Friday, there were around 1,200 left. Some were chronically homeless men who had nowhere to go before Hurricane Harvey.

Ms. Gonzales sits among them, uncomplaining and generally upbeat, never without her smartphone and the stylish cream-colored leather handbag she bought from Dillard’s department store.

Ms. Gonzales, 43, and her husband fled their rental home, along with her two teenage daughters and their 2-year-old grandson, Adam, when the roof caved and the floodwaters reached her knees.

The kids went with Ms. Gonzales’s mom, but her mom is recovering from a heart attack and Ms. Gonzales worries about how she is dealing with the stress. On Thursday night she picked up Adam and took him back to the shelter. The toddler slept between his grandparents on a pair of cots they had pushed together in the big open hall, amid a sea of cots and sleeping strangers.

Her husband’s truck gave out Thursday, probably from taking on floodwater. Ms. Gonzales went to see a lady from the Federal Emergency Management Agency about a next place to live, but she was confused by the requirements, and gave up. By Friday morning, she said she had no real plan. The night before, her husband had come back to the shelter and conked out after dealing with work and the dead truck. There was no time to talk about the future.

“I kind of feel a little worried about a lot of things right now,” she said. “I try not to let it get to me. But I do pray about it.”

Sofa surfing.

Jolin Matthews sat in her bedroom, which for today was Clara Grant’s living room, and tried to account for the past two weeks.

It began at Ms. Matthews’ apartment on a Saturday night, with a group watching the McGregor-Mayweather fight. The rain was falling and water was seeping in the door, but it was not until the next morning that the flooding turned serious.

Now it gets hazier. That first night Ms Matthews spent with a number of other displaced people at the house of one of her daughters. It was loud and crowded, and so she went — Ms Matthews, 48, thought for a moment.

Ashley’s house? Ms Grant, 56, offered, referring to a friend of Ms. Matthews, who is also Ms. Grant’s niece.

No, Ms. Matthews said, thinking. Ashley was later.

Anyway, it was on the second or third day that she had heard from Ms. Grant, a friend from work. Ms. Grant offered her couch, and despite reservations about being a burden, Ms Matthews hitched a ride to Ms Grant’s quiet bungalow, where she spent a peaceful night. But only one night. Then it was back to her daughter’s crowded house. Or maybe that was the night at Ashley’s. Or someone else’s. Or was that the night that she spent sleeping in a car by her flooded-out apartment? A night here, a night there, transportation from anyone whose car still worked. All of it was exhausting. And it was just beginning.

Who knew how long she would stay this time at Ms Grant’s or where she would go next? Who knew when she would get disaster assistance?

Still, she was grateful.

“If I didn’t have friends and family like this,” she said, putting her arm around Ms. Grant, “I don’t know where I’d be.”

At an uncle’s, sleepless.

Sylvia Garcia lies awake at night on her foldout bed and thinks of home. Ever since the flood, she and her parents and her younger sister have slept in a room in an uncle’s house, just southeast of Houston. The family is all together, and safe. They bought a folding table and brought in lawn chairs to make for a cheerful dining room. Another uncle, who had been with Ms Garcia’s family on the night of the flood, is also now staying at the house. Ms. Garcia’s niece and nephew will be coming next weekend. The family wears donated clothes, Ms. Garcia, 25, does online schoolwork when she gets out of her day job and the men watch football.

But she thinks constantly of her house, eight miles away, now half-gutted, its contents disgorged into the front lawn. She had been making payments on that house herself so there would be some stability for her parents, who are in bad health. “To make them happy,” she said. She bought much of the furniture and even managed to scrape up enough money to buy a used van for her mother.

The last night she spent in the house was on a tabletop, surrounded by rising waters, huddled with her mother, younger sister and uncle. Her father, who had been discharged from a hospital as the rains came, had arrived home just as the floods did. He passed the night floating in the water on a chair nearby, still groggy from medicine. The night passed dark and terrifying, and at first light she saw outside the window that boats were passing by on her street. The furniture is all ruined; the van was sold as scrap for $200.

She thinks about all of this at night, but she knows she’s not the only one in the room lying awake.

“They also can’t sleep at night,” Ms. Garcia said of her parents. “They’re wondering, ‘Are we going to have a house to go back to?’”

The hotel room, close but distant.

Kimberly Gatlin lives 10 minutes away from her half-ruined dream home. She stays at a Holiday Inn Express now, along Interstate 45. The recovery workers come down for breakfast in their work clothes around 6 a.m. Ms. Gatlin’s room is tidy, just like the dream home used to be. She has arranged a little bar, with big bottles of vodka and Hennessy cognac and Grand Marnier. She has a grocery bag stuffed with cans of tuna fish and pineapple.

Ms. Gatlin’s neighborhood is called Westador, 20 minutes north of downtown. She bought her house in 2010, and she fell in love with all of it. The house has five bedrooms and fancy ironwork on the balcony, like something out of an old movie. Ms. Gatlin, 52, is black, and the neighborhood has grown increasingly multicultural in recent years, but neighborliness, she said, trumps race: once a month, everyone on her block goes out for a friendly dinner.

Today, her section of the neighborhood still manages to exude a kind of refined charm, even though everyone’s stuff is now chucked out and growing mold by the curb in big piles. It’s as though a formation of handsome men, all in smart suits, drank too much cognac and emptied the contents of their stomachs all at once. It smells that way, too.

Ms. Gatlin is a train dispatcher for the railroad, and her company is paying for her hotel stay. They need her at work. “If a train dispatcher is not in the chair, no trains move,” she said.

She has started back at the job now, but before that she was out at the dream home every day, coordinating the volunteers who ripped out her drywall and the guy who towed away her dead cars.

“I’m physically, mentally and emotionally tired – I’m exhausted,” she said. “But you’ve got to keep going.”

She has no idea when she will be back home in Westador. On Friday morning, she said she was thinking about buying a rug for the hotel bathroom, and maybe a spread to personalize the bed.