Exactly when and how your baby develops a cycle of sleeping and waking before birth remains a bit of a mystery. It's not known whether your own rhythms influence your baby's sleep-wake cycle or whether your baby develops his own internal clock. Indeed, such a clock might be triggered in response to the small amount of light that is able to penetrate through the uterus during the last few weeks of pregnancy. It's apparent from brain scans, however, that by this stage of pregnancy, your baby does have very separate periods of activity.
There is a clear cycle, alternating between periods of quiet rest, sleep with rapid eye movements (REM), wakefulness with activity but no eye movement, and wakefulness with lots of activity and eye movements. During this sleep-wake cycle, the baby's actions becomes more coordinated as periods of activity are linked to rhythmical breathing and increased heart rate, and eye movements.
By this stage of pregnancy, electrical activity in your baby's brain shows patterns reflecting periods of sleep or wakefulness. An EEG of your baby's brain would show that the quietest period, deep sleep, takes up almost half of the time. The next most common state is REM sleep (the sleep stage during which children and adults dream). This is a time of great electrical activity within your baby's brain. During REM sleep the baby may be quiet or making lots of movements, so it's not possible to tell whether your baby is truly awake at this time or if he's dreaming. Paradoxically, the least electrical activity happens when your baby is most awake-in fact less than 10 percent of your baby's time is spent truly awake at this stage.