You can go straight from London to Scotland. You don't have to go to York! :) That said, I think I would spend my time in Scotland a bit differently. First, you don't have to spend the night in Glasgow in order to fly home from there unless you have a crack of dawn flight. I've often stayed in Edinburgh and flown out to the US the next day. You take a taxi to Waverley Station, 45-60 minutes later you are in Glasgow. You can then either take a taxi or the bus to the airport and that is at most a half hour. So hey, not that much more time than traveling from midtown to JFK at rush hour. :)
I can really understand the wish to see the highlands. However, remember, if your son and daughter-in-law will be in the UK for several years, you will be back! Maybe that is when you can stop off in York.
It would help to know what interests you. Here are a couple of suggestions.
The first one would be to take a late afternoon train to Edinburgh on Monday. Book into a hotel in Edinburgh for Monday through Friday which gives you four full days in Scotland. Take one the day tours of the highlands if you have your heart set on seeing Loch Ness and a look at the Highlands. Spend at least one day wandering around Edinburgh. Spend the other two days in one of these ways: Take a day trip to Glasgow tour the Cathedral and the new Transport Museum; Spend another day in Edinburgh; Take the train and visit Stirling and see it's very historic and interesting castle; take a day tour to the Borders and see the Roslyn Chapel and the Abbey's.
My second suggestion would be to stick with your first plan of the sleeper to Inverness, but plan on spending Tuesday night in Inverness. You can do a day tour out of Inverness to Skye or just go to Loch Ness etc. On Wednesday, got out to Culloden--you can take the public bus. Then you take the train south to Edinburgh. If you want to be adventuress or really like castles, you can stop off at Blair Castle. When I did this a few years ago, the hotel right near the railway stop let me leave my bag in their closet, but no guarantees. But the train ride from Inverness to Edinburgh is beautiful and you are missing it with the sleeper. You can also do a nice day trip on your own by train to either Kyle of Lochalsh where you can get a taxi to take you to Eilean Donan Castle, or you can stop earlier and explore Plockton. The train ride from Inverness to Plockton and on to Kyle of Lochalsh is one of the more beautiful train rides in the world--yes the world, not just the UK! When my sister and I did it decades ago, I was like a pinball rebounding from one side of the train to the other taking pictures. :) You have two days in Edinburgh.
You could also, take that night train to Inverness and pick up a car. Still spend the night in Inverness, and drive down to Edinburgh on Wednesday. You can drop off the car at the airport.
If you are really nervous about your flight you can spend Friday night in Glasgow. I would stay downtown, maybe near George Square.
Pam