The engines weren’t running. They were turning happily enough. The ash melted as it went through the burners, but then cooled enough to accrete on the turbine blades, changing their shape slightly, and causing the engines to to compressor stall. Restarting in denser air certainly wasn’t guaranteed, but the mach number would have been lower, making the engines less susceptible to the effects from the ash.
Think about it, if a 747 lost all of its hydraulics then the aircraft would be unflyable. The flight controls cannot be moved manually, only hydraulically. And without electrics, how would you restart anything. You cannot start the APU of a 747-400 in flight. For a windmilling start you need the IAS to be as high as possible to a minimum of around 250 KIAS. If they maintained their cruise speed, that would have been about 320 KIAS and at that speed the hydraulic pumps should work normally. The hydraulic pumps will hang in until about 150 KIAS. Not sure about when the generators would have dropped out...the best answer seems to be that you'd need to keep the IAS high.
I'll see if I can track down some more info about the generators. The manuals don't tell us much. I do recall that in some instances of engine failure, a generator warning was the first thing you got, so the margin in which they work may be quite narrow.
It gets more interesting. The actual report doesn't seem to be available, but I found this quote:
The crew were somewhat surprised to observe that loss of all generators had evidently not occurred as a result of the engine failures as there was no evidence of the electrical load shedding that, in corresponding simulator training, had occurred in such circumstances. Given the workload of attempting successive engine restarts during a glide descent in IMC, a key result of this was that the Captain’s AP was still useable.
So, that's probably the definitive answer. The generators stayed online, possibly though luck, and the APU wasn't used.