When you're in dark conditions, your brain raises melatonin levels so you can sleep. Bright conditions, on the other hand, decrease melatonin release and increase serotonin production. Many people with insomnia take melatonin supplements to help them sleep.
It's suspected that, because serotonin levels are often low in people with fibromyalgia and chronic fatigue syndrome, the brain may not be able to produce enough melatonin. The low levels may throw off the body clock and can make it difficult to sleep or wake in the morning.