There's a lot to be said for using your jetlag day to get to a distant destination since you may not be good for much, anyway. Have you considered starting in Granada instead? It takes longer to get there by train than to Seville, so it would save a bit more train time later in the trip if you flew there. In any case, if you've already purchased a round-trip ticket to Madrid, the issue you have is figuring out what is a safe amount of time to allow between scheduled arrival time in Madrid and departure time for the domestic flight. I have no answer there.
The advantage of starting in Toledo is that you don't have to guess whether your flight will be delayed. You can just go to the airport train station and buy a ticket to Toledo (changing at Madrid-Atocha). I think it's very unlikely you'd run into full trains to Toledo on a Sunday morning in late September, but I can't guarantee that. The trains are not super-frequent; there seem to be departures at 6:50 AM, 7:50, 9:20, 10:20, 11:20, 12:20 PM, 1:50, 3:50, 5:50 and 7:50. There are buses to Toledo as well (not departing from Atocha Station, and slower), so that would be a non-costly back-up plan.
I think there's a lot more to see in Toledo than in Segovia, but Segovia is also a very worthwhile destination and would be suitable for your first night.
I would be nervous sightseeing in Granada the day of a departure from Madrid-Barajas. There's a 5:20 PM train on the weekday schedule. It arrives at Atocha station at 9:45 PM, and then you'd have to get to the airport. I think that's too late for a midnight departure (is that an intra-EU flight?). There's also the non-zero possibility that the last train would be late or canceled. The previous departure from Granada is at 1:20 PM, which would really not give you much sightseeing time that day by the time you allow for storing and retrieving luggage.
Trains from Seville back to Madrid are a lot more frequent, and most are faster. I am risk-averse and would be uncomfortable being in Seville on departure day, but I think reversing the trip and ending up with the Seville-Madrid travel leg would be a better option. That's assuming there are still Alhambra tickets available for what would be your new dates of stay in Granada.