I’m in northern Spain and have to take a train to Madrid to get to a flight. But I arrive to the train station too late at 11:40 so booking is not an option since most places check in are at 12:00 and I’d probably not get in time.
Would it be too dangerous to stay up all night on the street?
One option to consider would be stopping for the night in a town north of the city to have an earlier arrival. If there are morning airport connections that get you checked in early enough.