Waking from Sleep with Lid Closed?

Hey, just wondering if anyone else has had this issue: when I close my laptop it will sleep, but when its in my bag sometimes it will just wake from sleep at random (with the lid closed). Since its in my bag I’m scared to put it to sleep because fires and heat damage so I’ve always just hibernated it every time I need to save my work and power off quickly. Any ideas why/ how to fix?