If this is while you're awake or trying to go to sleep (& perhaps now that you know about it - stopping you from getting to sleep) then it may be due to stress, or overtiredness, or wanting to deal with things that you haven't done that day etc.
The only way I know of to stop this type is for you to learn to relax, yoga, meditation, pilates, chinese ying/yang balls, worry beads, soft music, relaaxation tape , whatever works for you.
If you are overly stressed/worried/depressed etc you might also look into natural remedies for stress releif/reduction (5htp, sam-e etc).