According to What to Expect, linea nigra is caused by an influx of the same pregnancy hormones that cause freckles, dark areolas and other pigmentation changes during pregnancy. Linea nigra is a normal symptom of pregnancy and usually fades without any intervention after birth.
The American Pregnancy Association states that linea nigra usually occurs around the fourth or fifth month of pregnancy, and that it usually presents as a dark pigmented line that runs from the belly button to the pubic bone. There is no way to prevent linea nigra. It is often the darkening of a line that already exists, but may be too faint to see before pregnancy.