It may be water hammer...if the plumbing underneath is loosely fitted, when pressure on the system increases and relieves, it can cause a slight tremor in the pipes (waterhammmer) that will make a resonating "buzzing" sound for quite some time....make sure all the pipes underneath the bathroom (if not a slab foundation) are tightly secured to the framing with plumbers tape.