A bacon sub is a colloquialism for masturbating in the bathroom at subway bathroom with mayonnaise.
Brian had a "bacon sub" on his break while thinking about his coworker Jenny