According to a recent study published in New Scientist, spraying a pen full of pigs with lavender oil made the pigs less aggressive and appear calmer, suggesting that there is a biochemical reaction to something in the lavender oil. If you buy a lavender sachet to put into your pillow to help relax, you might feel calmer simply through association. The placebo effect (probably) doesn't work with pigs.
Sadly the study didn't say how much lavender oil was needed per pig, nor exactly how less aggressive they became, which means that filling my pump-action water pistol with lavender-scented water and squirting it at the next feral boar that decides to chase me probably won't calm it down. It might even annoy the pig further.