Mine would do that when the dimmer switch was on it's last legs. Best guess was the contacts inside the switch were crispy. I'd switch from high to low beam, or in my case from high beam to nothing, quickly 3-5 times and eventually the low beams would work again (for awhile).
An oddity that happened about the same time, sometimes the low beams would just quit. Seemed to be heat related as it only happened after about an hour or so of driving with the headlights on. I'd stop, switch off the headlights and give things a chance to cool down and all was good again. Best guess is it was the same set of crispy contacts in my dimmer switch that was acting like a bi-metal.