Hidrogen is collected by downward displacement of water because it is less denser than water and so it comes out at the surface of water and also it is insoluble in water so it does not disoolves and nearly all the gas released may be collected by this process.
While, in case of displacement with air, it seems dengerous as hydrogen is highly combustible and get oxidised when comes in contact of oxygen it burns with a pale blue flame and produces water. So, it is not possible to collect hydrogen gas in air medium. Further, if anyhow we prevent it from catching fire, then also it may get mixed with other imporities of air and so the pure dihydrogen will not be produced.