In private contexts, the parties usually share the costs equally. In business contexts, the company often covers the costs. Some legal insurance policies also cover mediation — it is worth checking.