This website indicates a study was done by the US army but it offers no citation or identifying information. I've scoured to try to find the answer myself but am running short on time. Is it true?
Keynes suggested it during the Great Depression. It's not exactly the same, but I think what you've heard was a mutation after so many years.
In the depths of the great depression, Keynes suggested that "the Government should have people dig up holes and then fill them up". What at first seems like a wild idea, may have had some logic behind it. Keynes believed that an initial injection into the economy could stimulate economic growth. Digging up holes and filling them up again seems pointless, and is, except that it gives money to people, which they then go and spend, increasing aggregate demand - leading to economic growth. This effect is known as a "multiplier" effect - an initial investment leads to a greater than proportional increase in national income/product/output.
The actual quote from his book was:
If the Treasury were to fill old bottles with banknotes, bury them at suitable depths in disused coalmines which are then filled up to the surface with town rubbish, and leave it to private enterprise on well-tried principles of laissez-faire to dig the notes up again (the right to do so being obtained, of course, by tendering for leases of the note-bearing territory), there need be no more unemployment and, with the help of the repercussions, the real income of the community, and its capital wealth also, would probably become a good deal greater than it actually is. It would, indeed, be more sensible to build houses and the like; but if there are political and practical difficulties in the way of this, the above would be better than nothing.
And the second mention of "dig:"
'To dig holes in the ground', paid for out of savings, will increase, not only employment, but the real national dividend of useful goods and services. It is not reasonable, however, that a sensible community should be content to remain dependent on such fortuitous and often wasteful mitigations when once we understand the influences upon which effective demand depends.
The practice of 'make work' was quite common long before the great depression. If the US army did study it (and I have no information if they did or not) then it would not have been for soldiers to dig the holes, but for the desperate to be given a means of earning some income - the theory being that work was better then charity and any work was better then no work. In parts of Ireland, you can see beautiful dry stone walls that were built up and over mountains by wealthy land owners during the famine (1845-1852) to give their starving tenants the income to pay their rent (and feed their families).
Background reading and references: The use of work vs charity to deal with poverty: Irish Poor Law - 1838
Interesting essay on what lead to the Irish famine being so severe: http://www.clarelibrary.ie/eolas/coclare/history/prefamine_clare.htm