The interaction of thermally excited gravity waves with mean flows