At the end of the first week of lockdown in London, my neighbors and I stuck our heads out of our windows, or stood in our doorways banging pots and pans, to applaud the nation’s nurses, doctors, and care workers for doing daily battle with the virus we had all come to fear. We’d been inside all week, the weather tauntingly, insultingly beautiful, without hearing so much as a minor argument or a loud takeout order on our silent block. But there were signs of polite strain. In our local park, joggers held out their arms to keep others at a distance, like odd, flightless birds. Little baggies of dog poop had accumulated in mounds, with dog-waste bins removed and collection staff reduced. The children who lived on the ground floor of our building made us a robot out of cardboard Amazon boxes. We wiped it down with Dettol and hoped they wouldn’t come again.

When the applause began, it was startling and joyous, a moving tribute and a welcome relief from the silence that had descended on our neighborhood. People added cautious whoops and whistles, and flicked their lights on and off in a show of community and solidarity. And then they kept going. And going. The owl-like hoots became full-throated yells. The children next door were screaming, the family dog barking continuously. The parents were screaming, too. When it was over, and the silence had resumed, I turned back to our apartment, experiencing a kind of vertigo. The debris of our isolation, I suddenly noticed, was everywhere: the adult coloring books, the yoga mats, the baking supplies, the booze, the Purell. A rowing machine, on loan from my closed-down gym, was wedged into a corner. Everything was wedged. We were wedged. Week one, I thought, just twenty-five, or maybe a hundred, more to go. We needed advice on how to make it through. It was time to call in the experts.

Tom Williams is a clinical psychologist for NASA’s Human Factors and Behavioral Performance (H.F.B.P.) unit, which studies the behavioral-health effects of long-duration space missions. The risks associated with isolation and confinement in a spacecraft—or, at a stretch, a third-floor walkup—make up a key area of his research. “We’re trying to determine, when we put people in this isolated area, how does that change their psychosocial functioning? How does it change their physiology? Do we see stress markers go up?” he told me over the phone recently. Tom noted one study of long-term isolation, completed as part of the Mars500 project, in which astronauts simulated a seventeen-month trip to Mars in a fake spacecraft. Over time, the astronauts’ level of physical activity decreased dramatically; on the simulated return trip they slept a total of seven hundred more hours than on the voyage out. (They also played a lot of Guitar Hero.) “When people don’t have as many ways to interact with their environment, one adaptation that they make is that they reduce activity over all,” he said.

The lack of physical activity can show up in the brain, too, whether the isolated person is “an astronaut in space” or “someone who spends ten to twelve months in Antarctica.” Tom noted, “The same area of the brain that gets activated—the somatic sensory cortex—that part that allows us to integrate the sensory inputs that we get when we hear things, see things, and walk and engage with our environment, those areas tend to diminish slightly.” This is why astronauts sometimes have trouble walking after reëntering the world—their brain has difficulty processing the outside world. “If people just sit in a room, if they just have four walls around them and they don’t have a lot of activity, then that’s a potential risk,” he said. I looked at the inert rowing machine and the four walls around me. “The good news is we’re hoping we won’t be sitting in rooms for ten months at a time.”

Tom told me he had put together an acronym to help astronauts (and the rest of us) reframe how they think about confinement with others: “CONNECT.” The first “C” stands for community. “Think about the community impact, that we’re sharing this experience with others. That’s a good indication that we all need to pull together,” he said. The “O” stands for openness to this new challenge; “N,” for our network of friends and family, which becomes more important during isolation. Another “N” for needs. “We all have physical, emotional, psychological needs,” Tom said. “When we’re more isolated, we have a diminished set of available resources to meet those needs. And so we have to be more creative in how we do that, and that’ll give us a greater sense of control over what’s happening to us.”

“E” stands for an expeditionary mind-set (“it’s a new experience”); “C” stands for countermeasures, or the actions we take to calm frayed nerves. NASA offers mindfulness training to astronauts, teaching them to “be aware of how things are impacting on you, and then to take proactive steps not to let stress get too high.” The “T” stands for training and preparation. “How do we pull on the previous experiences we’ve had with adversity?” Tom asked. “How do we draw strength from others around us as they post different ideas? How do we share with others how we’re handling it, to help strengthen them?”

Jessica Williams usually goes to work every day on the military ship Intrepid, a nineteen-forties-era aircraft carrier-turned-museum, which floats just off Manhattan at West Forty-sixth Street. For twelve years, Jessica, the curator of history and collections at the museum, climbed up and down the ship’s ladders to get between workspaces. These days, the ship is empty, and Jessica has set up a makeshift office at home, with a laptop from work that smells like the Intrepid. “It has a very specific smell of diesel, and so when I sit down here to open up the laptop, I get this whiff of the ship,” she said.

The museum also encompasses Growler, one of the first nuclear-missile-deploying submarines sent out by the U.S. Navy. From 1958 until 1964, Growler embarked on long missions to the far Western Pacific, where it would sit outside a major Soviet submarine and military facility and wait for an order to launch its missile. About a hundred men could fit on board, and most of them slept in bunks stacked four high. (An unlucky few practiced “hot bunking,” which is like hot desking, only more intimate.) Most trips lasted seventy days, with a fuel stop or two, but, for the most part, “you’re not even coming to the surface, because the submarine’s trying to stay hidden,” Jessica said. “So you’re basically in this tube, underwater, with the same hundred people for the bulk of that deployment.” Cozy.

Even much larger vessels, like H.M.S. Belfast, now anchored on the Thames as part of London’s Imperial War Museums, had to make clever use of space. Built in the nineteen-thirties, the ship could accommodate up to a thousand men, many of whom slept in hammocks spaced two feet apart. “You’d have had your kit lockers nearby, where you could keep your kit bag with all the stuff you would need—your razor, your cigarettes, your spare bits of uniform,” Rob Rumble, the ship’s curator, told me. The veteran sailors slung their hammocks in the best locations, while rookies got stuck with less desirable spots, like above the machinery in the anchor room (“Lots of winches, and chains,” Rumble said.) But it wasn’t all bad. According to interviews conducted in the nineteen-nineties and early two-thousands, the hammocks were incredibly comfortable. “When you’re asleep in a hammock, you’re the center of gravity, so however rough the sea is, the ship moves around you,” Rumble said.