Most people here will poobah your idea, saying it's un-American. And I don't know of any forum that does what you want.
That being said, it could work. Whether you reserve the room first or recruit the companion first, both of you would have to be named on the reservation. If you reserve the room first, paying the rail fare and accommodation charge (usually the higher of the two), and then recruit a companion, you would have to call Amtrak to add them to the reservation; and another rail fare, but NOT accommodation charge, would be due. You could then split the accommodation charge.
As Caravan mentioned the formula for two people in sleeper is 2 x rail fare + 1 x accommodation charge. So, if you split the latter equally, the formula per person is 1 rail fare + 1/2 accommodation charge.