If your tom cat is fine and is just developing a habit you have a problem. I over came this with one cat by spraying a large cloth bag laid over my bed with orange and filling it with orange peel.
Most cats hate orange. It's worth a try with your boy.