I did an Amtrack train trip years ago. The trip that I took started at Union Station in DC and took me the southern route of the US to California, then up to Washington State, then through the mid-West, then finally back to DC. From start to finish, the trip took me three months, and I could get off of the train anywhere I wanted, for as long as I wanted, as long as the entire trip was completed within 90 days. I never got a formal sleeping car, but instead, I slept in the regular seats. Most often, though, I got off of the train and stayed at local Hostels in the area. Yes, there are Hostels in the USA (lots of 'em, in fact!), and you don't need to be young or old to stay there. Also, the costs to stay in a Hostel were incredibly cheap...as cheap at $6.00 per night on up. Much cheaper than staying at a hotel.
I had a great time on the train, and I'd love to do it again. It was very comfortable, and very reasonably priced - I seem to recall that the cost was about $238 for three months' worth of travel.