Okay, I know this was done before, but I thought I'd post how I did mine. The LEDs light up whenever the tailgate is opened, and there is a switch in the dash that operates like the dome light switch. I flip the switch up, and the LEDs come on independant of the tailgate position. The centre position keeps the LEDs off at all times. Flip the switch down, and the LEDs turn on whenever the tailgate is opened. There is also a pilot light on the switch that that lights whenever the LEDs are on. Here's the basic circuit.
The schematic does not show the pilot light, and only one LED strip, but the second LED and the pilot light are wired in parallel to the first LED strip.
I found a 12 V source in the main fuse box under the hood. It's circled in red in the picture.
I connected an in-line fuse holder to it. I didn't insert a fuse until I was completely finished. I used a crimp-on spade connector. I left the fuse holder inside the fuse box and fished the wire from the fuse box out of a hole drilled in the side of the fuse box.
I then soldered a wire to the wire from the fuse holder, and used heat shrink to wrap it up.
I found a plug in the firewall right behind the brake master cylinder.
I pulled out the plug, replaced it with a gommet and fished the wire from the fuse holder inside the cab.
I covered up the wire with plastic wire loom.
I left the wire in the cab, and proceeded to work in the box. I removed the two cubby holes from both sides of the box.
I tried pulling up and out as suggested by others here on TW, but still broke the bottom 2 clips on both cubby boxes. I noticed the boxes were also held in by double sided foam mounting tape, so when I later reinstalled them, that's what I used. The picture below shows one of the broken clips.
I used two flexible, weather proof, self adhesive LED strips I found at a local electronics store. The LED strips are rated 12 V.
I stuck the strip under the box rails on each side. The picture below was taken after I hadfinished the install, so the LEDs were on.
I then fished a pair of wires from the right cubby hole to the left cubby holen and another pair from the left cubby hole to the cab. At the left cubby hole, I crimpped the two pairs of wires together in a parallel circuit fashion to spade connectors. I used a female connector for the positive, and a male connector for the negative.
I routed the wire into the cab through a rubber gromet under the driver's seat.
I wrapped it up in wire loom, and tie-wrapped it to the frame.
I installed a pin switch at the back of the box which will be pressed when the tailgate closes. I ran the wire to the cab in a similar manner.
In the cab, the wires from the box ran under the carpet, under the door sill, behind the kick panel to the dash. I crimpped the positive wire from the LEDs and the positive wire from the fuse box together using a female connector, and connected the two wires to the rocker switch terminal for the pilot lamp. I then connected the negative wire from the LEDs to the common terminal of the switch. I connected the up terminal (the terminal that is connected to the common terminal when the switch is in the up position) to a ground on the body of the truck, and I connected the down terminal to the wire from the pin switch.
I installed the switch in one of the blank spaces on the dash. I got the switch at a local auto parts store. I had to use a dremel tool to trim the hole in the dash to make the switch fit.
I put a 7.5 A fuse into the fuse holder, and now, I have cargo lights that operates when the tailgate is down, or when I switch them on from the switch in the cab.