I believe this peom speaks of Whitman's quest to show the people what is good. I also agree with Brian on the part about the clergymen and how they often would preach things like slavery that were wrong and cruel but I don't think it was limited to this.
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 think that this poem is about Lincoln just as O captain My captain was. In this one Whitman is campaining Lincoln for presidency offering the nation a perfect pilot as it heads for troubled times. Also Whitman presents Lincoln as a very humble leader with the discription of him putting off and rowing.