Hot, sweaty and still staring at the ceiling as dawn breaks? Here's why – and what you can do about it