OK - think I've sorted it. Turned out to be a faulty power cord: the slightest movement appears to have resulted in a momentary loss of power. I don't understand why the PC always rebooted instantly and didn't stay powered off.
Anyway I've replaced the power cord and it's a much tighter fit in the power supply socket. I can't reproduce the problem anymore so I assume it's fixed. Of course when inserting or removing a USB device the cable is close to the power cord, so one slight nudge ......