I used a mercury tilt switch as described above, on the canopy light on my Crewman. It is strapped to the eye level brake light, out of the way. The picture below shows the rear window in the open or up position.
Here is a link to the Jaycar item that I used.
If you use a pin switch (door switch), it will require a mounting hole / bracket and will always be sticking up and something will get hooked on it and bend it or break it.
The mercury switch won't require any holes and can be held in place with a cable tie or a small blob of silastic.
Just cut the positve wire to the light and connect the two legs of the tilt switch to the two wires. Fit heatshrink or insulating sleeving over the joins.
The switch is glass, so, fit it where there is minimal chance of it being crunched.
If you run a new power feed for the light from the battery, make sure a fuse is fitted at the battery end of you power cable - not at the "light" end.
You mention wanting to install the light "in the tray". The light may be better attached to the under side of the lid so that the light will illuminate the entire tray area and not be blocked by whatever items may be in the tray.
There are some very good double sided tapes around that could be used to attach the light (it wouldn't be very heavy) and this would avoid the need for any holes.