Where does the initial action potential come from?
The very first evoked spike is most likely triggered by spontaneous activity, as even neurons with no synaptic connections are able to fire action potentials (Luhmann et al. 2016). Later in life neurons can be excited by the external environment through sensory stimulation. At some point the central pattern
   generators also mature and, either by network synchronization or tuning of intrinsic neuronal properties, are able to maintain a self-sustained activity pattern.

The question is then what triggers spontaneous activity during development? It has to do with calcium signaling, both exogenous and from internal stores. The exogenous trigger is paracrine release of GABA and glutamate before the formation of synapses (Rosenberg and Spitzer 2011).