To calculate Fisher p-value you would need three BED files: 1. First bed file to overlap, i.e. file1.bed 2. Second bed file for overlap, i.e. file2.bed 3. Bed file that will serve as genomic background for overlaps, i.e. background.bed
Note that file names do not have to be file1.bed, file2.bed, background.bed, this is just an example.
As genomic background you can use e.g. combined ENCODE set of open chromatin regions or a similar data set. Genomic background is necessary to calculate the constituents of the Fisher test contingency matrix: overlap of A and B in the background BG set, A but not B in BG, B but not A in BG, BG without A and B.
On my github page I provided a combined ENCODE DHS data set in a bed file which you can use as a background set, i.e. background.bed.