Place purple hull peas into a large pot; pour in enough cold water to cover peas. Bring to a boil over high heat. Add okra if using and boil for 2 minutes, stirring twice. Reduce heat to medium-low; add bacon, sugar, baking soda, salt, and pepper. Cover and simmer until tender, 1 1/2 to 2 hours.