I did this with 2 friends in Germany when I lived there.
I'd simply hop on the slow train and get off at whatever random village, find the nearest bar and talk to the locals/ get drunk.
Since you can drink alcohol anywhere in Germany and bars and pubs are open including on the trains, I basically stayed an hour or two, or untill we got bored, and caught the next train, and went on a mobile pub crawl. If we discovered an interesting place we'd go check it out. Places with castles/towers interesting shit.
When the trains stopped running we'd get a cheap room in whatever town village we ended up on and got a room, and drink untill the bars closed or we were too drunk to speak coherant English, let alone German.
Good times, and honestly the cheapest way you can have a vacation. Walk around with some cheap beer and explore these towns with your friends. I wish America was this easy to have fun in.