Chiming in very late here, but I know many parents of gifted kids deal with sleep problems, so others might be searching...
I was advised by several doctors to try very low-dose Melatonin (300 mcg), which some studies have found to be more effective than higher dosages.
My gyn and PCP both advised me to take 300 mcg daily for 30 days, 2 hours before bed, to try to develop a better sleep pattern. My son's ped advised the same. Ds has used it intermittently (with amazing results), while I've used it more regularly.
I had previously tried 3 and 5 mg doses and found that I had very vivid dreams and didn't sleep as well. With the 300 mcg dose (I order on Amazon), I get perfect results.