This poem is obviosly influenced by the civil war and all the wounds and carnage he saw in the hospitals. In this poem i believe Whitman is trying to convey to people the brutality of war. The sleeping at midnight part tends to imply that his dreams are still haunted by this. I believe he is just relaying the the truth of the war and letting people make their own decisions about what is right.
I believe Walt whitman talk about the civil war because he was nurse in war. I think he describe civil war real wel; l with desc'riptive terms like 'faces of anquish' and 'moving the heaps'. and the fact that Walt Whitman did not want civil war to be real for he spoke of it like a dream.