This expression originated in the late 19th century in the USA with reference to a member of Congress returning to his home town to keep in touch with the voters and to look after his interests there. Similar notions are conjured up by the saying good fences make good neighbours.
1994 - Louis de Bernières - Captain Corelli's Mandolin - He knew assuredly he should go and mend his fences with the priest.
RELATED IDIOMS :
over the fence :
unreasonable or unacceptable - Australian & New Zealand informal
1964 - Sydney Morning Herald - Some publications which unduly emphasize sex were entirely over the fence.
sit on the fence :
avoid making a decision or choice
The two sides of a fence are seen here as representing the two opposing or conflicting positions or interests involved in a particular debate or situation.
1995 - Duncan McLean - Bunker Man - Let's have a proper decision - goal or no goal - none of this sitting on the fence.