You're probably hitting the search haptic when you set it down. I've done that quite a bit. So if you want to prevent it. You'd have to root and find a way to disable the haptic.
I have done the same thing, just try to position your hand differently when you are setting the device down to prevent it from activating. Those bottom buttons are a bit sensitive.
It happens to me also, when I put my phone down and don't plan or picking it right back up I just hit the sleep button on the top first. This way I don't have to worry about hitting the search button by accident.