Lowland (Glasgow & Edinburgh)
A class 92 electric drags 16 coaches (6 sleepers + seated coach + lounge car for each destination) from Euston as far as Carstairs where the train splits. The front 8 coaches with the 92 continue on to Glasgow Central via Motherwell, another loco attaches to what was the rear of the train to pull the remainder over the north curve at Carstairs up to Edinburgh.
The reverse is slightly more complicated in that the class 92 with the Glasgow portion runs to the 'far' (London) end of the platform at Carstairs before the portion from Edinburgh can run again over the north curve, through the station itself and then back on to the carriages already in the platform. The loco can then be detached for the arrival of the 'down' train.
Highland (Fort William, Aberdeen & Inverness)
Again a class 92 drags 16 coaches from Euston direct to Edinburgh. The front two cars (the wiki is incorrect) are for Fort William, the next six for Aberdeen, and the rear eight for Inverness. Aberdeen & Inverness portions include a seated coach and lounge car. The train splits at Edinburgh, the class 92 being detached and class 67 diesel locos attaching to each of the individual portions in turn, starting with the Inverness portion on the rear which departs first. After that leaves at 04.15 another 67 can attach to the Aberdeen portion (unless the Inverness portion shunts forward in the platform and there's enough room with a crossover to attach it sooner). The 67 with 2 MkII cars (seated/lounge car) for the Fort William portion can shunt them onto the eastern end after the 92 has split, but the 67 then has to 'run round' the four cars. This whole process usually takes place in platforms 11-7 using the crossover.
In reverse it's less complicated. The Aberdeen portion is due to arrive into Edinburgh first, this pulls up at the near (western) end of platform 11, leaving enough room for the 92 to attach. The 67 can then be split off to Millerhill. The Fort William portion arrives next, the 2 MkII day cars are now at the end with the 67. The train runs past the Aberdeen portion (through p10) and using the crossover to p7 backs onto the Aberdeen cars and hitches up. The 67 can then take the two MkII cars to the motorail bay. Finally the Inverness portion arrives, again it runs past the train and backs up, loosing its 67 also.
An electric loco pulls the stock to/from Euston ECS to/from Wembley with the 92 DOR, as well as at Glasgow to/from Polmadie. The Edinburgh portion ECS is pulled to/from Polmadie by its own loco which then has to run round. At Aberdeen & Fort William the loco also has to run round to shunt the stock into sidings, but doesn't have to in the evenings.
That's the jist of the nightly operation, timings omitted. Obviously the process is slightly different if the sleepers use the ECML, chiefly because they leave from the opposite (eastern) end of Waverley. The Lowland for example would then join at Edinburgh, not Carstairs (unless they run the full rake from Glasgow which I don't think they do).