Whether you can't stop thinking about work tomorrow, or your just too excited about an idea you thought of, you need to calm yourself so you can get some shuteye. Author Naomi Goodlet at Pick the Brain suggests you promise yourself that you'll return to your thoughts later:

If you notice a recurring idea or thought, try making a deal with your mind, saying to it "I promise that I'll make some time tomorrow to give this thought the time and attention that it deserves, but for now, I need to get some sleep."

Just make sure you actually follow through with your promise. If you don't, you'll have a hard time letting go of your thoughts the next time. You can even jot your thought down so you know it will be right where you left it. Relax your mind and you'll finally be able to sleep.