Next time it happens get someone to watch the lights on the boiler.
If the hot water demand light stays ON, but the burner light (the little flame) goes OFF, then the boiler's diverter valve is staying where it should be, but the boiler is shutting off the burner for some reason.
This could be because the temperature on the main g/w heat exchanger is too high, or it could be that the sensor detecting this is faulty.
If the hot water light goes OFF, then look to the diverter valve. If the valve has failed, it won't stay pushed out and will switch the boiler off. If the switch itself has failed, this can do the same thing.
Hope this helps
Bunslinger
January 2009