I've stumbled upon a treatment for activity-induced insomnia ... effective for me, so since this is ME-related, I have no idea whether it will work for anyone else.
For years now, physical activity past ~2 PM would trigger insomnia typically around 1-4 AM. Cognitive exertion or quickly-digested carbs would also trigger the same insomnia. Recently I added eggs to my diet, and noticed that I didn't get the expected insomnia from physical activity. I've gone for walks of several km in early afternoon and later afternoon without triggering insomnia. Cognitive exertion still does trigger insomnia (proven at 1:20 this morning. *sigh*). I haven't tested afternoon sweets yet.
One medium chicken egg in the evening solves my physical activity -> insomnia problem. I doubt that it's a nutrient, since it doesn't have any that meat lacks. My guess is a hormone or other chemokine. Is it travelling to my brain to fix something, or fixing something in my gut or the connecting nerves? The answer isn't tempting enough to convince me to hold egg yolk in my mouth for 5+ minutes before spitting it out to see whether sublingual absorption works. I also haven't tested whether timing is important. Maybe the effect lasts long enough that it doesn't matter what time of day I eat the egg. I think it worked while I was having them just for breakfast, but I'm not sure.
Maybe this technique will help someone else. Even if it doesn't, it might be another bit of data for figuring out why exertion triggers insomnia.
While checking on hormones in eggs, I came across a couple of interesting bits. While melatonin is important for sleep, it's precursor serotonin is anti-sleep (promotes brain activity). So, boosting serotonin would only help if the conversion to melatonin was working properly. Orexin is also important for sleep, and it's inhibited by sugars, so that might explain my carb-induced insomnia.
The third interesting bit was that sleep isn't one mechanism; it's several redundant mechanisms. Redundancy should be good for reliable sleep, but multiple mechanisms also means multiple ways to malfunction, possibly in ways that overrides the other mechanisms. In short: sleep is complicated. I'm just happy that I found a way to have some more activity options without risking a short-sleep night.