Night flight off the boat, CAT 4...half way down the stroke lost all electrical power to the cockpit. Held the stick where I thought a good spot was, BN grabbed goggles, put them on (stby gyro tumbled with loss of electrical power...not supposed to happen that way). Subconciously glommed off on the oil rig with the gas vent fire and was in a 45 degree left AOB thinking that was "up" climbing through about 150'. BN was cool hand luke the whole time. Raised the gear and climbed out through the Persian Gulf overcaste to get on top. No navaids, but had radios and external lights. Couldn't figure out why we had such funky electrical indications (NATOPS said it wasn't supposed to happen that way). Departure directed an S-3 to join and bring us down but we graciously (vociferously) declined. Asked for the recovery tanker (fellow A-6) to take us down. We had no idea on our fuel state (we were full on launch and had been flying for about 20 minutes...just guessed how long to dump to get down to max trap). At 4 miles we had to do a 360 to continue our "SWAG" dump to max trap. Instant vertigo. Lead decided to drop us off "a little high and a little lined up left on the ACLS...thougt it would help since we were flying stbd IFR parade). Didn't help. We were high and lined up left. Put a correction in at 3/4 mile at the ball call and proceeded to do my best "cougar" impersonation. CAG paddles famous call..."Level your wings" BN said "there's no level", he was still wearing his NVGs. Paddles lip locked me, BN called wings level and line-up corrections along with stby vsi calls...all in the calmest voice I'd ever heard. We trapped (taxi one wire) to an OK underline. Stopped the jet in the LA (last to recover) and shut down. Had vertigo so bad (not to mention uncontrollable leg shakes) that when I climbed down the pilot's boarding ladder I fell over. Flight deck chief helped me up and got me to the ready room. BN saved our lives by his calm and positive comm, I was scared sh!tle$$. Gave him a big hug and he said it was nothing, but he had his right hand on his ejection handle from the 360 turn at 4 miles til the trap. Found out that maintenance had been done on the nose wheel well circuit breaker panel and the electrical quick disconnect worked as advertised...it quickly disconnected on the cat stroke after not being tightened down post maintenance. The jet was 512 (the one with my name on it), maintenance never gave me the jet again that cruise (maintenance master chief had pity on this superstitious nugget). But....skipper had me back up the next night. Didn't like it at the time but the best thing for the scared pilot to get over the event.