Ah yes. This happend to me in the dead of night out in BFE. Anyway, your headlight switch is probably to blame. Its pretty common on D90s. Over time heat warps the plastic mount that houses the contact from the headlamp. As a result the contact recesses into the plastic mount, which leaves the circuit open.
I'd recommend just replacing the switch. Give George at Rovers Down South a call and order one.
PS Oh I forgot to mention. While you wait for the new switch just cut the three wires, closest to the switch, off and close the circuit by crimping/soldering the three together. This tempory fix will allow you to merely unplug the quick disconnect when you need to turn you lights off or visa-versa.