Headlights turn off

I have a 2006 Dodge Caravan,
on two separate occasions the headlights turned off and we could not get them on for several minutes.
And on one occasion we couldn’t turn them on.
Now they seem to be working fine right now.
The bulbs seem to be okay, I was thinking maybe a relay but I can’t find a relay for the headlights.
Anyone have an idea what it could be?

Head light switch.
Internal contacts overheat, bending away from contact untill they cool again.

Something similar happened to my Civic about 7 years ago. The lights failed at dusk - and luckily was nearby home before darkness came - because my lights wouldn’t turn on. (I think the side markers still lit). The next day, the lights worked again as I was about to take it into the dealer. Never a problem with the lights again, so I didn’t have them checked out. BUT I wondered what had happened. Now I know. Thanks KG!

I think normally the relay will be in the fuse box in the car or under the hood. They are little cubes that plug in. When the circuit over-heats, the breaker will open and when it cools will close again. So could be bad switch, wiring problem, bad breaker, or bad relay. When they go out, you should be able to go to high beam which is on a different circuit as a temporay measure. Had that problem on my Riviera. Never did find the problem but went away when I disconnect the twilight sentinel.