"It was far in the night, and the bairnies grat"

These lines are taken from a Danish ballad called The Ghaist's Warning.  A translation appears in an appendix to Walter Scott's poem The Lady of the Lake.

Nelly's couplet isn't quite accurate.  It should be:

       Twas lang i' the night, and the bairnies grat:

       Their mither she under the mools heard that;

An approximate translation:

       It was late, and the children wept,

       Their mother beneath the earth heard that,

The Ghaist's Warning can be found here with an accompanying glossary.