He's doing this because your laptop is warm. Try getting an electric heating pad and putting it in his bed under a blanket. Heating pads are not that expensive and easy to find at most drug stores. When he realizes his bed is warm too, and much more comfy, he may want to start sleeping there instead of on top of your hard laptop.
Also try putting something on top of your laptop that will divert him from wanting to sleep there. An old trick to keep cats off of counters is to put out aluminum pie pans with something noisy inside, such as coins or keys, so that if the cat jumps up and disturbs the pan, it will make all kinds of noise and scare the cat away. See if that works for your computer.
Like many others have said, I also leave the screen at an angle, not closed all the way, and my cats leave the computer alone.