I have a lot going on in my life.
I have two young kids and a wonderful wife.
I have a great if demanding job.
I really like training.
When I train a lot, I don't sleep well. And when I don't sleep well, I'm not happy. And when I'm not happy, it takes a toll on my family and career (and training).
I think I've finally figured out how to fix the problem. I'm posting my conclusions in the hopes that others find them useful. I'm not a doctor or a scientist, and I have only a basic understanding of some biological processes. I encourage you to correct my explanations, but please don't just comment that something is wrong. At least come up with a different theory that goes beyond placebo effect.
How are your electrolytes? I've found this to be the biggest problem with trying to sleep after running. Your body is fatigued, but you can't seem to get it to calm down when you lie down for bed. You are too hot so you take the blankets off, then you are too cold. Maybe you fall asleep for a thirty minutes and then wake up like you just finished your run.
Assuming you got enough to eat after your run, you probably got enough sodium back in your system (unless you had a really low sodium dinner, which is hard to do). Potassium and possibly magnesium are your culprits here. Try this: before bed eat a banana, a big glass of orange juice, or a bowl of applesauce. Finish it off with a big glass of cool water. With the orange juice you should notice a pretty quick effect. You temperature will get back under control. With the others it may take a little longer. You can also put a couple of tablespoons of lemon juice into a glass of water if you are out of options. You can try adding a magnesium pill if you think you're deficient there. Sports drinks don't seem to work well.
My theory as to why this works: Sodium, potassium, and the other electrolytes are important for all kinds of bodily functions. When you exercise and hydrate you tend to wash them out. It seems like there is something to the ratio of potassium to sodium as well, which is why I think sports drinks don't work well (because you get sodium from your food, plus more sodium and potassium from your drink, leaves you with too little potassium).
How is your protein? This seems to be a problem when trying to sleep after lifting weights or doing crossfit. Either you can't fall asleep, or you fall asleep and about three hours later you're wide awake and your heart is pounding. And your spouse is wearing pajamas and under 4 blankets while you are in your underwear without even a sheet and you're still too hot.
You may not have enough available protein in your system. If you can't fall asleep, try eating more protein right before bed. The guideline among athletes who are trying to build muscle mass and strength is one gram of protein for every pound of bodyweight per day. I like to have a healthy serving of meat at dinner and then a protein shake with 20 ounces whey protein right before bed every night.
I find that after a heavy lifting day, even with this I will wake up three hours later with the same symptoms. If I have another protein shake or protein bar then I can go back to sleep for the rest of the night. Alternatively, if I also have a casein protein shake before bed, that lasts me through the whole night. Casein protein has been a great find for me.
My theory as to why this works: When you lift heavy weights your body incurs significant muscle damage. It then repairs the muscle damage as part of the recovery and adaptation process. Your body needs amino acids to do this. Amino acids come in protein. When your body needs protein and doesn't have any available from food that you eat it goes into a catabolic state where it starts breaking down your existing muscles (that you worked really hard to attain, by the way) and uses the byproducts to repair and adapt the damaged muscles. I think that the pounding heart and overheating is a symptom of this catabolic state. Also, your body gets through the protein that you had for dinner (and any whey or egg or soy protein) in about 3-5 hours, and then it wakes you up screaming for more. Casein protein takes a long time to digest, so it will slowly enter your system all night and keep your body happy.
It's also worth noting that one of the amino acids involved is tryptophan, a.k.a. as the thing that puts you to sleep on the couch at thanksgiving (tryptophan shows up in most animal proteins including turkey). So it's possible that there is something else going on with by body, but the tryptophan is just knocking me out.
How is your hydration? Once you're sure that your electrolytes are good, you should check your hydration. This can show up with similar symptoms: difficulty regulating temperature, pounding heart. Make sure you take your 20+ ounces of water before bed. If you wake up in the middle of the night with these symptoms, especially if you've been out drinking, take a nother 15 or so.
My theory as to why this works: Your body needs water to function, but if you don't have your electrolytes dialed in you will only exacerbate the problem by washing out more electrolytes. So take care of those first. I think the racing heart may have to do with low blood pressure due to a lower volume of fluid in your system. When your blood pressure is lower your heart has to beat harder and faster to keep up with the body's needs.
That's all I got. Hopefully this was helpful. Put any other tips you have in the comments.