(ABRIDGED) We have analysed the near-infrared photometric data from the Fourth Data Release (DR4) of the UKIRT Infrared Deep Sky Suvey (UKIDSS) Galactic Clusters Survey (GCS) to derive the cluster luminosity and mass functions, evaluate the extent of the cluster, and study the distribution and variability of low-mass stars and brown dwarfs down to the deuterium-burning limit. We have recovered most of the previously published members and found a total of 287 candidate members within the central 30 arcmin in the 0.5-0.009 Msun mass range, including new objects not previously reported in the literature. This new catalogue represents a homogeneous dataset of brown dwarf member candidates over the central 30 arcmin of the cluster. The expected photometric contamination by field objects with similar magnitudes and colours to sigma Orionis members is ~15%. We present evidence of variability at the 99.5% confidence level over ~yearly timescales in 10 member candidates that exhibit signs of youth and the presence of disks. The level of variability is low (<0.3 mag) and does not impact the derivation of the cluster luminosity and mass functions. Furthermore, we find a possible dearth of brown dwarfs within the central five arcmin of the cluster, which is not caused by a lower level of photometric sensitivity around the massive, O-type multiple star sigma Ori in the GCS survey. Using state-of-the-art theoretical models, we derived the luminosity and mass functions within the central 30 arcmin from the cluster centre, with completeness down to J = 19 mag, corresponding to masses ranging from 0.5 Msun down to the deuterium-burning mass boundary (~0.013 Msun). The mass function of sigma Orionis in this mass interval shows a power law index alpha = 0.5+/-0.2.