Doable by car. An overnight is not possible by train, IMO. Figure an hour to get out of the airport, 45 minutes on the express shuttle to Atocha, that means an afternoon train to Toledo, then you really need to go back to Madrid that night for your flight (10:30 plane means arrive at airport at 9, and I don't think there are any trains that early). You'd need to get to Atocha by 8 then the bus. Way too tight. So you could take a 8PM train back to Madrid, leaving you with a few hours in Toledo. Technically possible, if you REALLY want to see Toledo.
By car is an option with more time in Toledo. But I'd stay in Madrid and enjoy it. Here's why:
If your plane is coming from the US/Canada (i.e. you're not visiting somewhere else in europe first then taking a short flight to Madrid), I'd think carefully about jet lag. If you travel enough to know you won't be horribly affected, great. Many people (not all) are extremely tired on landing day - it's a different kind of tired. On my first trip to Madrid, I landed at 9AM and had a train to Seville at 7PM. I figured I'd see the top sites in the city in that day and head on. I did, but it was kind of miserable and my memory is lacking. Add a 4 year old and I'd imagine it's worse. My kids are total disasters on landing day. It's just a given in our family. Hard enough for me. My version of jet lag is an awful arrival day, bed at normal time, and perfectly fine from then on. Everyone is different. I'd be hesitant to drive in a foreign country on arrival day after an international flight. But this varies and if you don't experience jet lag this way, great!
Stay in Madrid. Enjoy Retiro Park (nice, relaxing, there's a playground). Do a museum (pick one!). Sit and have a long lunch with wine and jamon. Go to the food market. Go to the Palace. Get a hotel, go to sleep by 9 (obscenely early for Spain, but you'll need your energy for the rest of your trip!)