We present an investigation of the dynamics of centre-of-mass of a neutral particle cloud in a cavity pumped by an optical field. We derive an expression for the pump threshold for spatial self-organization of the particles and analyze its scaling laws in terms of the system parameters. Using a newly developed statistical model, we simulate the dynamics of the particles and numerically obtain the scaling laws. We show good agreement between the analytic formulae and simulations. We further use the scaling relation to discuss the operating conditions for cavity cooling a large ensemble of particles. Finally, we study cavity cooling of an ensemble of molecules with an initial temperature of around 10 mK. We show that 35% of the molecules are trapped by the optical field intensity in the cavity and a final temperature below 1 mK is reached. © 2009 The Royal Society of Chemistry.