How bright are the LEDs you have in mind? If you're hoping to do much beyond moonlights this likely won't work out in a 5 gallon tank. Brighter LEDs require a heatsink of some sort, and in this case it will wind up being the water, ultimately. Anything bright enough to light the tank effectively will produce enough heat to seriously mess up the temperature of the water.
If you're going for low power LEDs, for moonlights or some sort of colored lighting effect or what have you, you might be able to get away with thoroughly coating the LED/exposed wiring in clear nail polish and letting it dry completely. I don't know that I would want to leave it like that long term, but when I was making my LED fixture for a nano I dropped a 5W LED into the water and it continued running just fine coated in polish. Something smaller and lower powered should present a much smaller concern.