Is there any health risk from sleeping with a laptop?
Just set the laptop to go into hibernate mode after XX idle minutes (I’d say 20 would be a good number). The bigger concern is the excess heat damage to the laptop – particularly the battery. Operating at high temperatures greatly reduces the life of the battery, so take that into consideration. You also have the slight risk of fire due to a faulty overheated battery.
I’m guessing that this isn’t a problem based on your previous experience, but be sure not to toss and turn or things could get ugly/broken. For what it’s worth, I do this all the time and I still seem fine. Just be aware of how your body is positioned pre-sleep because the biggest risk is probably a stiff neck or back in the morning.
The first thing that comes to mind for me is that a lot of research shows that staring into a laptop screen is a lot like sitting in a well-lit room: it sort of keeps you awake. Seems you can fall asleep anyway, but it’s probably not the best for your internal clock? Seconding the others that say it’s more the laptop than you: I’d be terrified of rolling over onto the screen and snapping it, or of blocking the fan and causing it to overheat. Though you say you’ve been doing it for years? People get pretty close to their laptops in normal use, anyway. IANAD, but I don’t think you’re at any particularly elevated risk of anything. I’d be slightly concerned about wireless if you use it: I wouldn’t really want a radio transmitter next to my head all night, especially one at microwave frequencies. But as I went to type that, I realized that I spend more time with my cell phone (at similar-enough frequencies and probably greater power) pressed to my ear than with a laptop by my head, and I su