A method for humidifying gas in a ventilator circuit 100, 101, 102, 105, 106 comprises aerosolising a humidifying agent such as water or saline using an aerosol generator 2 and delivering the aerosolised humidifying agent to the inspiration line 101 of the ventilator circuit coupled to the respiratory system of a patient. The aerosol generator 2 comprises a vibratable member 40 having a plurality of apertures extending between a first surface and a second surface. A controller 3 controls the operation of aerosol generator 2, for example in response to the flow of air in the inspiration line 101 as detected by a sensor 11.