Possibly originating from a poem by William Cowper (floruit 1731–1800), whose first stanza reads: God moves in a mysterious way / His wonders to perform; / He plants His footsteps in the sea / And rides upon the storm. Despite the late attestation, the general sentiment of the phrase does hold apparent wide-ranging and prehistoric theological currency.