Another thing that REALLY helps for those nights you just can't stop thinking about stuff. Keep a pad of paper and pen beside the bed, and when you can't stop thinking about something, just write it down.
Sometimes I have my best ideas as I'm falling asleep, and I instantly get that rush feeling of 'oh shoot I'm going to forget this', and that feeling alone wakes me back up so to speak. It may be a single idea, something you want to mention to someone, a list of stuff to do, or even a sketch. If you can just get these out of your head and somewhere they won't disappear, it really does help.