We investigate the formation, gravitational clustering, and interactions of solitons in a selfinteracting, non-relativistic scalar field in an expanding universe. Rapid formation of a large number of solitons is driven by attractive self-interactions of the field, whereas the slower clustering of solitons is driven by gravitational forces. Driven closer together by gravity, we see a rich plethora of dynamics in the soliton "gas" including mergers, scatterings and formation of soliton binaries. The numerical simulations are complemented by analytic calculations and estimates of (i) the relevant instability length and time scales, (ii) individual soliton profiles and their stability, (iii) number density of produced solitons, and (iv) the two-point correlation function of soliton positions as evidence for gravitational clustering. * mustafa.a.amin@gmail.com † philip.mocz@gmail.com; Einstein Fellow 1 Here, by cosmological initial conditions we mean an almost homogeneous field with small perturbations.