It might have rained during the night.

Literal

Night [gen-の] interval-during rain [subj-が] fell-[nominalizer-の]-[maybe-かもしれない].

The ~のかもしれない ending adds the explanatory の before かもしれない, giving a nuance of 'it might turn out that...' — slightly more tentative than the bare ~かもしれない. The の packages the proposition as a potential explanation rather than a bare hypothesis.