If Possible, Remove the Batteries: This is the surefire way to prevent a sex toy from accidentally turning on during transit and discharging all its battery power. Place your batteries in a plastic bag and store them separately.
Choose Products With a Lock Feature: If you're traveling with a rechargeable vibrating toy, or one with a battery can't be removed, check if it has a lock feature. This will prevent it from turning on, even if its buttons are accidentally pressed.
Pack Small/Discreetly Designed Products: Small toys are perfect for travel, as they can be stashed just about anywhere and are less likely to draw attention. Alternatively, a larger vibrator with a simple, understated design (e.g. no zebra stripes or glittery rabbit ears) can be an ideal option.
Pack It Between Other Items: Rather than let a sex toy roam freely in your carry-on or luggage, pack it in a carrying case or plastic bag and place it between layers of clothing. Should your bag get searched, this will buy you time to quietly explain that you're carrying a sex accessory and ask that your bag be searched in private.
Personally I would just buy new ones at your final destination than go through all this crap