We present a hydrodynamic model that captures the essence of granular
dynamics in a vibrating bed. We carry out the linear stability analysi
s and uncover the instability mechanism that leads to the appearance o
f convective rolls via a supercritical bifurcation of a bouncing solut
ion. We also explicitly determine the onset of convection as a functio
n of control parameters and confirm our picture by numerical simulatio
ns of the continuum equations.