With spotty cellphone reception, so if you want to disconnect from constant connectivity that's also an interesting way.
It's a great experience, but if you're thinking of just sitting in there and programming in a room with a view, keep in mind that the scenery changes and is pretty amazing, which might distract you from programming.
This sounds like fun. I wonder if there are any European routes that are as long/uninterrupted that I could try that on.
I went London-Japan overland but my longest single segment was two and a half days (Moscow-Shymkent), and that was about right - time to relax and do nothing for a bit, but by the third morning I had definitely spent enough time in the same compartment, as nice as it was.
The London to Ft. William sleeper, when there's leaves on the line?
That said, a sleeper car on Amtrak gets you: a flat surface to lie down on, your own toilet (note the toilet is just there in the roomette, next to the bunk, prison style), access to a shower (your own shower in the rooms, one per car for the roomettes), access to the first class lounges, and includes meals in the dining car.
Rooms have a slightly wider lower bunk versus roomettes to sleep 2 (skinny) people and an enclosed toilet so you don't lose mystery from your romantic or work relationships. Roomettes are too small for a first world prison cell but have the beds oriented parallel to the direction of travel, which many people find more comfortable -- the rocking of the train is more soothing and less jarring.
If you have the time, don't mind paying four-star hotel prices for a two-star experience, and hate flying or have a medical condition that makes it infeasible you should definitely consider it.
Or, if you're on this site, it's a great excuse to sit in a small room with a view and not talk to anyone for several days, just read, write and program.