P traps work by holding a small amount of water the the U shape. This water is replaced each time the drain is used. If a drain is not used for a period of time, the water in the trap will evaporate and the seal is lost. The T/P on the water heater is opened with the handle or lever on the valve. The T/P is either on the top or the top side of the tank and has a pipe that goes to the floor it sounds like yours goes into a standpipe similar to the washing machine. Since when a T/P is opened for testing, it sometime does not close and water will continue to be discharged, I would suggest you just pour a couple of quarts of water in the standpipe and see if that solves the odor problem. If you do open the T/P and it does not close tight, you will need to replace it. This is not terribly difficult, but you do have to have a pipe wrench or two and some Teflon tape. You would turn the heater off, close the intake valve, and remove the drain pipe then the valve itself. Replace with a new T/P, refill the tank if needed, then restore the power. Never power up a water heater that is not full of water. If this is not something you feel you can do, call a plumber.