In a colander, toss the okra with 3 tablespoons of the salt. Let drain in the sink or over a bowl for 1 hour.
Combine the water, vinegar, the remaining 3 tablespoons salt, the sugar, bay leaves, cayenne and mustard seeds in a nonreactive saucepan over medium heat. Stir to dissolve the sugar and salt. Bring to a boil. Add the onions and cook for 1 minute, until they are slightly soft.
Rinse the okra in cool water to remove the salt and any slime that has accumulated. Put the okra in a large plastic bowl or other nonreactive container. Pour the brine mixture over the okra and stir. Cool to room temperature.
Cover and refrigerate for at least 6 hours before using. Can be stored in airtight containers in the refrigerator for up to 1 month.