What we did was travel out of Santiago on Iberia the day before, stayed at a hotel with shuttle service to and from the terminal, and flew out back home the next day. The flight from Santiago to Madrid is just a little over an hour vs. by train which takes 5 to 6 hours.
This site is run by Ivar at in Santiago de Compostela.
This site participates in the Amazon Affiliate program, designed to provide a means for Ivar to earn fees by linking to Amazon