Question: I'm going to a concert to Vienna on Saturday (two days). I just realized that there aren't any trains back to my home in the night so I'd have to wait til the morning until the first train leaves again (5.43 AM).

I don't know when the concert will end, but expect it to be somewhere between midnight and 2 AM. 

Now, I don't want to spend 40 € on a hotel room, especially when I can only "book in" in the middle in the night and have to leave really early. 

Is there any safe space in Vienna for a young woman to stay for a couple of hours in the middle of the night? I don't need to sleep, I just don't want to get raped. 
Are train stations safe there? Or are there any cafés which are open 24/7? MacDonalds?

Answer: 
Update May 2022: both McDonald's are closed overnight.

---

There are only 2 McDonald's in/near Vienna that are open 24/7 (and even on [the Chistmas and New Year holidays](https://www.mcdonalds.at/downloads/oeffnungszeiten_2018.pdf)):

* at the aiport, Objekt 115
* in Wiener Neustadt, Pottendorfer Str. 45

Their [restaurant finder](https://www.mcdonalds.at/restaurant-finder) has on option to restrict the search to restaurants that are open 24/7: go to "Detailsuche", tick "24h geöffnet".

All the Burger Kings and KFCs are closed during the night.

As @FDMS notes, the only transit service to the airport that runs 24/7 (though very infrequently) is the [Vienna Airport Lines](https://www.viennaairportlines.at) bus service ([network map](https://www.viennaairportlines.at/en/info/1144)), which costs 6.5 € per direction. The last train to Wiener Neustadt, which is over one hour away from Vienna, leaves at 01:01 from the main train station (Hbf).
If your main concern is that you have to pay for a hotel room for the entire day but would spend only a couple of hours in it, maybe you could opt to leave Vienna later in the day or early evening instead of early morning. 

That way you can relax after a possibly tiresome concert, wake up fresh, then either spend time in the room or explore Vienna a bit (if you haven't already) and then take a train to your final destination later in the day. I feel this option would be safer than opting to stay out in the open (even if its in a 24-hour McDonalds). You could cut your cost by some euros by staying in a dorm instead of a hotel room.