Just give up. Too warm? Just let your blood boil. Too cold? Just go into a coma and never wake again. It's better than the stressful search for a comfortable position.
This has been me for over two months. I've had a flare of Ulcerative Colitis which means my bowels have decided to be on speed. So every time I lie down after 10 minutes I need to get up and go to the toilet so I can't actually rest. I've been in hospital and I'm out so hopefully things will clear "soon."
That's exactly what it feels like when my toddler insists on sleeping on me and I am lucky enough to manage myself out of a dangerous position (which, e.g., would lead to suffocation) but not into one that would be anywhere near comfortable but I also cannot adjust more because they would wake up and rinse repeat the whole process.