I am in a little sleeper cabin on a train to Chicago. Framing the window are two plush seats; between them is a small table that you can slide up and out. Its top is a chessboard. Next to one of the chairs is a seat whose top flips up to reveal a toilet, and above that is a “Folding Sink”—something like a Murphy bed with a spigot. There are little cups, little towels, a tiny bar of soap. A sliding door pulls closed and locks with a latch; you can draw the curtains, as I have done, over the two windows pointing out to the corridor. The room is 3’6” by 6’8”. It is efficient and quaint. I am ensconced.

I’m only here for the journey. Soon after I get to Chicago, I’ll board a train and come right back to New York: thirty-nine hours in transit—forty-four, with delays. And I’m here to write: I owe this trip to Alexander Chee, who said in his PEN Ten interview that his favorite place to work was on the train. “I wish Amtrak had residencies for writers,” he said. I did, too, so I tweeted as much, as did a number of other writers; Amtrak got involved and ended up offering me a writers’ residency “test run.” (Disclaimer disclaimed: the trip was free.)

So here I am.

Why do writers find the train such a fruitful work environment? In the wake of Chee’s interview, Evan Smith Rakoff tweeted, “I’ve been on Amtrak a lot lately & love writing while traveling—a set, uninterrupted deadline.” The writer Anne Korkeakivi described train travel as “suspended impregnable time,” combined with “dreamy” forward motion: “like a mantra, it greases the brain.”

In a 2009 piece for The MillionsEmily St. John Mandel describes working on a novel during her morning commute on the New York City subway. “It felt like extra time,” she writes. “I began scrawling fragments of the third novel on folded-up wads of scrap paper, using a book as my desk.” Mandel polled around and found other writers used the subway as a workspace, too. Julie Klam: “Part of the reason I like it is because it has a very distinct end. It’s not like having six hours at home. I tend to have great bursts of inspiration that last about six stops.” Mark Snyder: “I think the act of working, surrounded by other people living their lives, can be quite a compelling act for yourself. It makes me feel less alone.”

These reasons are all undergirded by a sense of safety, borne of boundaries. I’ve always been a claustrophile, and I think that explains some of the appeal—the train is bounded, compartmentalized, and cozily small, like a carrel in a college library. Everything has its place. The towel goes on the ledge beneath the mirror; the sink goes into its hole in the wall; during the day, the bed, which slides down from overhead, slides up into a high pocket of space. There is comfort in the certainty of these arrangements. The journey is bounded, too: I know when it will end. Train time is found time. My main job is to be transported; any reading or writing is extracurricular. The looming pressure of expectation dissolves. And the movement of a train conjures the ultimate sense of protection—being a baby, rocked in a bassinet.

Writing requires a dip into the subconscious. The lockbox, at times kept tightly latched in our daily lives, is pried open, and things leak onto the page that we only half knew were there. Boundaries help to contain this fearful experience, thereby allowing it to occur. Looking around at my fellow passengers gives me an anchor to the world: my fantasies, my secret desires, aren’t going to get anyone killed. We’re all okay here; we’re all here, here.

* * *

My father is a foamer. That’s the technical term for a rail fan so enthusiastic he foams at the mouth at the sight of a train. There’s a black-and-white photograph of my dad as a child in a onesie, his nose in a book called Wheels and Noises. When I was growing up, he routinely spent weekends “chasing trains,” or driving alongside impressive steam engines and hopping out of the car to film them chugging by. (He still does this.)

His dream, I think, was for my brother and me to grow into fellow foamers. But whereas my dad was fascinated with the mechanics of trains (“note the slender pipes pointing toward the rail in front of each drive wheel,” he wrote in one of his “Train Picture of the Day” e-mails), my “foaming” is pure emotion. His fascination is with the train itself. My fascination is with me on the train.

My father was so dedicated to his passion that he made trains his job. Throughout my childhood, he traveled weekly to Indiana to manage a particular product line within a freight transportation company: vehicles that were equipped to travel on both road and rail. Something like two decades ago, when my brother and I were children, we accompanied my dad on a trip to the headquarters of his company. On the way home, we rode the Lake Shore Limited, the train I’m on now.

Here are my scattered sense memories of that trip: a sleeper cabin shared with my brother. We slept in bunk beds; my dad slept across the hall. Dinner in the dining car; delight in the compactness and efficiency of our little cabin. A desire to live on this train—but, underneath that, a comfort in the knowledge that we wouldn’t, that the trip had an end, that we would leave, that we’d be home.

Jessica Gross is a writer based in New York City.