Insomnia is linked to pregnancy in many ways. It depends, of course, on which part of the pregnancy you date the onset of your insomnia. Many mothers say that they understood why the discomforts of pregnancy and the disruption of the normal night and day created by the demands of a newborn would cause insomnia. But, after all of that, women often date the onset of insomnia to after the baby has begun to sleep all night. They say, "now the baby is sleeping all night and I can't sleep". This would be post partum onset of insomnia; part psychological and part hormonal. Your question is related to the pregnancy itself. The hypothalamus of our brain is a small structure, which is packed with cells working 24/7 to help us stay awake and put us to sleep. Adjacent to these structures in the hypothalamus are cells which become super active during pregnancy. It is akin to having several busy factories operating at peak and often influencing the activities of the other just by the shear "noise" or "heat". There is often competition for neurotransmitters, peptides, enzyme enhancers, etc. Diuretic activity is affected to produce more urination (that alone will interrupt sleep) and elevate the body temperature (we sleep best when the body is cooler). Hormones in the hypothalamus control our hunger, electrolytes (sodium, potassium), milk production for the baby, sex hormones (menses are put on hold), and metabolic activity (blood sugar, thyroid, adrenal, etc.). All of this chemical activity creates a chaos which is fortunately less affected than imagined. External factors can disrupt the orderly fashion designed to prevent no sleep or no wakefulness. These factors include medications, diet, activity, temperature, clothing worn and other health issues. To help with the insomnia, correct everything you can, such as staying cool, avoiding spicy foods and omitting medications you don't absolutely have to consume. Follow the common rules of good sleep hygiene. And, understand, everything that is going on is for the protection of you and the baby and all other body systems, which must continue to operate while your brain and body are preparing for the development of a newborn.