I just left San Antonio this morning, after arriving on the eastbound Sunset Limited/Texas Eagle (connecting to the northbound Texas Eagle) at 10:30PM, not departing until 7:00AM. I walked the roughly one mile to the Alamo from the San Antonio station at midnight, and it felt perfectly safe to me. There's a Denny's about a third that distance, open 24 hours. The area right by the station, all the way to downtown, appears very safe and clean.
Chicago is a different story, but even at 11PM you should be able to get a taxi near the station fairly easily.
Enjoy your trip!