The fetal magnetoencephalogram (fMEG) is measured in the presence of large interference from maternal and fetal magnetocardiograms (mMCG and fMCG). These cardiac interferences can be attenuated by orthogonal projection (OP) technique of the corresponding spatial vectors. However, the OP technique redistributes the fMEG signal among the channels and also leaves some cardiac residuals (partially attenuated mMCG and fMCG) due to loss of stationarity in the signal. In this paper, we propose a novel way to extract and localize the neonatal and fetal spontaneous brain activity by using independent component analysis (ICA) technique. In this approach, we perform ICA on a small subset of sensors for 1-min duration. The independent components obtained are further investigated for the presence of discontinuous patterns as identified by the Hilbert phase analysis and are used as decision criteria for localizing the spontaneous brain activity. In order to locate the region of highest spontaneous brain activity content, this analysis is performed on the sensor subsets, which are traversed across the entire sensor space. The region of the spontaneous brain activity as identified by the proposed approach correlated well with the neonatal and fetal head location. In addition, the burst duration and the inter-burst interval computed for the identified discontinuous brain patterns are in agreement with the reported values.