These are two separate questions:
1) How to get a kid to go to sleep?
and
2) How to calm a kid down after a vivid dream/nightmare?
The short answer to the first question is: routine.
The most common reason why my kiddo can't get to sleep at bedtime is because she's not tired. Maybe she stayed up too late the night before and slept too late in the morning. Maybe she took a nap earlier that went too long. Maybe she's just full of pent-up physical energy because she's been cooped up all day. Or maybe she's full of nervous/excitement energy because of something happening tomorrow.
Setting and sticking to a daily routine (bed/nap/meal/play times) eliminates the first three sources of a sleep problem. Turning bedtime into a daily routine, where it's a predictable process that happens every night, can make giant strides in eliminating the last one.
Lest you be misled into thinking this is coming from the perspective of one of those people who writes out every minute of his day into a Franklin planner a week ahead of time, I'm not saying that this has to be a rigid schedule, because life is unpredictable and kids especially so. Some general guidelines will do... DS should wake up at about x:00, and take a nap around y:00 for roughly zz minutes, etc. Then just observe and adjust as necessary.
One short answer for the second question is: talk.
A vivid dream will especially affect a gifted child, because of emotional sensitivity. Your DS will be unable to get to sleep because he's in an emotional state that prevents it. Therefore, the goal is to bring him out of that emotional state and into a calm one. One effective method is to simply talk about the dream. Point out what's silly in it. Discuss some similar dreams you might have had. Under all the conversation, there are some distinct messages you want to convey:
- It's just a dream, it's not real, and it can't hurt you.
- This is all very normal, everyone experiences this.
Sometimes this helps the kid gain perspective and look at the dream a different way... but sometimes it doesn't, because as your gifted child remembers an experience, he physiologically relives the emotions. So my second short answer to this question is: redirect. Read him another story, or allow him to read one on his own if he's doing that already. Let him snuggle up with you for a while and watch some TV. Whatever gets his mind off the dream and lets him calm down.
And then, the next day... beware. Because now you've taught him that a nightmare leads to specific comforting actions, and you can be sure he'll try to fake it sometime later in the future in order to obtain those rewards. Parenting these kids is so much fun, innit?