Hum is usually some sort of grounding problem. Is the hum there if you guitar is not plugged in. If it isn't then it is something associated with the guitar like a bad cord. If it is still there then it could be a bad ground connection in your wall wiring. Try moving the amp to a different location or even better a different building. You can try the grounding switch on the back which has three positions. Normally the switch is in the middle. Try the switch in the left and right positions and see if this helps. Try some of this stuff and post back with the results.
Check the tubes. I've had some bad preamp tubes that made my amp hum. And right now my Mark II has worn out powertubes and they hum. I kinda found this accidentally. I had this occasional hum and after a while I realized it's only there when I use simul-class. Then I just tapped one of those inner tubes and found tapping affected the hum. My Hiwatt started to hum after I replaced the tubes. Tech found out one of the JJ tubes was busted which created unbalanced situation in the powersection and I think it's the same situation in my Mark amp.
Yes it could be a tube or internal wiring. You didn't indicate if the hum is still there if the guitar is unplugged but let's assume that is the case. Tube wise you can start substituting and see what happens. You also indicated that the hum varies with the master gain. You can also try the gain control to see if it varies with this. This can help isolate where the hum is in the amp. Internal sources of hum includes filter caps both for the B+ and the bias and a lifted center tap on the filament transformer.