As I recall, at least on my bike, the stator doesn't put out enough voltage when the rpm goes below about 900. If it wasn't idling high enough it could cause the lights to flicker and pull a pretty good draw on the battery. When you restarted it and held the throttle open a little you raised the rpm to a level that allowed the stator to put out voltage, thus providing enough voltage for the battery, spark plugs, lighting, etc.
(this could also be caused by loose or dirty connections on the battery cables)
My concern would be what caused it to idle that low in the first place.
(this could also be caused by loose or dirty connections on the battery cables)
My concern would be what caused it to idle that low in the first place.