In the film they are trying to retrieve intel and decide to put down their guns and melee fight so both trenches wouldn't open fire on them. Did this happen? How often? Were there any other unwritten agreed upon rules of engagement when in no man's land?
Within the latter half of the main question I refer to outside of combat how likely was it for opposite sides to meet in general?
Might not be the answer you were looking for. But it most certainly could've been fact or fiction. Millions died in no mans land, Bullets hit each other in mid air collision and enemies played soccer games on Christmas. During massive attacks men were forced to walk during an assault. As far as I'm concerned it is possible a midnight melee could've happened. I've heard stories of pilots crash landing and having to traverse through no mans land (no source) It's possible others had to as well.
That being said it is likely that something similar in nature to the scene happened in real life.