Vitamin D is produced by the skin in sunlight. The melatonin that affects sleep is produced in the pineal gland during the dark. Both of these are known to affect SAD.
However, melatonin that affects GI motility and sensitivity is produced by cells in the GI track. These cells produce 10 to 100 times as much melatonin than is found in the blood from the pineal gland. This melatonin does not contribute to sleep because it works locally and does not enter the blood stream. A recent study found that IBSers with sleep disorders that took 3 mg of melatonin at bed time had relief from pain and urgency but it had no affect on sleep. Perhaps the quality of sleep was better because the GI symptoms during sleep were better.
I am going to write a long post on melatonin and IBS in a few days.
Thanks for your note.
-------------------- STABLE: ♂, IBS-D 50+ years - Science of IBS