Imprints of accretion on gravitational waves from black holes