With a little searching, I found this “maxim” to be part of a sentence from a poem of Petronius Arbiter (CE ca. 27–66). Below is the citation with the reference:
… Nam cum prostrata sopore
urget membra quies et mens sine pondere ludit,
quidquid luce fuit tenebris agit. …
“For when rest presses down the prostrate limbs in sleep, and the mind plays with no weight on it, it acts out in the dark whatever it did by day.”
—Petronius Arbiter, Poems, 31