Vibrate off when sleeping (not just sleep hours)

Hey all

My sleep schedule varies during shift work.

Is there a way to turn off vibration when it detects you’re sleeping, as opposed to just during predefined hours?