Certain LED and HID lights have one bulb but inside is a shutter that redirects where the light goes ( alters the beam spread) instead of the traditional high/low bulbs and switch back and forth between the bulbs, so my question is does your high beam indicator on the dash also come on and off in sync w the headlights switching back and forth? If not my guess would be the aftermarket relay that controls the shutter/ bulb control is defective or possibly loose connection. This could also ring true if it has separate bulbs that are high powered enough that they also have a relay that the manufacturer sent with the kit since some of these lights require a relay because they exceed what the factory setup can handle.
So step1 if it was me, does dash indicator match what's happening? If not problem is most likely in the after market relay or control box or loose wire.
Step 2 find brand of lights and look up their troubleshooting guide or schematics, find the relay and replace it or test it.
Step 3 if you have the OE lights or can borrow some re install them and see if problem persists, if no then mostly likely the problem is with aftermarket system, if yes then problem is most likely the OE switch.
I had an aftermarket HID system in my one Duramax truck and every so often it would hiccup, once was the relay, once was actually so simple it eluded me for months, the inline blade fuse was in the terminal on one end, but between the terminal and the plastic housing on the other, this caused the lights to not fire once in awhile, simply turning them off then back on usually did the trick, then one day nothing.... which is when I finally found the issue, none the less the sytem always scared me even though it usually worked well, so much so I kept the OE bulbs in plastic protectors in the glove box just incase.