How does neural spiking begin in the fetus? I'm interested in modeling human brain spiking activity. How does the very first spiking activity begin in the fetus?

I imagine all spiking activity is initiated by the senses and internal oscillators. Am I right? Or are there other initiators of spiking activity?
Many parts of the fetus brain begin showing neural activity before the senses that feed them are sufficiently developed to provide actual sensory information. In other words, it is unlikely that spiking activity in the brain is initiated by the senses. Some of the cells that become sensory organs, however, often fire in very specific patterns similar to the patterns they will use when they start actually sensing.
An example from Penn &amp; Shatz (1999): in the human fetus, the connections from the eye to the visual cortex form before the retina is developed enough to respond to light. However, at this time the retinal ganglion cells spontaneously generate highly correlated bursts of action potentials. These bursts are similar to the sort of data they will generate once they actual start sensing, and these preliminary bursts allow the human fetus to start developing its visual cortex before it even has functional retina. This is not unique to humans, and similar activity was first observed in rats (Galli &amp; Maffei, 1988).
The take away message, is that the cell in the brain start firing spontaneously before they has any sensory input. Some of this early firing is 'random' in the sense you asked before. However, neurons that develop into future sensory organs, tend to have their spontaneous firing resemble what their typical sensory production will look like in the future (once they start sensing). This allows the downstream circuitry to start adapting to the firing pattens before any real sensory infromation becomes available.
References

Galli, L., &amp; Maffei, L. (1988) &quot;Spontaneous impulse activity of rat retinal ganglion cells in prenatal life&quot;. Science 242(4875): 90-91.

Penn, A.A., &amp; Shatz, C.J. (1999) &quot;Brain Waves and Brain Wiring: The Role of Endogenous and Sensory-Driven Neural Activity in Development&quot;. Pediatric Research 45: 447–458.