Rotational studies at a variety of ages and masses are important for constraining the angular momentum evolution of young stellar objects (YSO). Of particular interest are the very low mass (VLM) stars and brown dwarfs (BDs), because of the significant lack of known rotational periods in that mass range. We provide for the first time information on rotational periods for a large sample of young VLM stars and BDs. This extensive rotational period study in the 1 Myr old Orion Nebula Cluster (ONC) is based on a deep photometric monitoring campaign using the Wide Field Imager (WFI) camera on the ESO/MPG 2.2m telescope on La Silla, Chile. Accurate I-band photometry of 2908 stars was obtained, extending three magnitudes deeper than previous studies in the ONC. We found 487 periodic variables with estimated masses between 0.5 Msun and 0.015 Msun, 124 of which are BD candidates. This is by far the most extensive and complete rotational period data set for young VLM stars and BDs. In addition, 808 objects show non-periodic brightness variations. We study the dependence of the period distribution on mass and variability level and compare this with known higher mass objects in the ONC (Herbst et al. 2002) and with the 2 Myr old cluster NGC 2264 (Lamm et al., 2004). We find that substellar objects rotate on average faster than the VLM stars. Our rotational data also suggest a dependence of the rotational periods on position within the field, which can be explained by a possible age spread in the ONC. In addition, periodic variables with larger peak-to-peak amplitudes rotate on average slower than those with small peak-to-peak amplitude variations, which can possibly be explained by different magnetic field topologies.