In many articles and books, I've seen people write that Europe "sleepwalked" into one of the most devastating wars in its history in 1914. What exactly do historians mean when they write that Europe "sleepwalked" into war? And how and in what ways?
Without knowing precisely what articles and books you've encountered, it's hard to know. Let me also suggest that the articles and books themselves should explain what they mean by "sleepwalking into war."
If those sources are dated 2012 or later, then most likely they are making some kind of reference to Christopher Clark, The Sleepwalkers (2012), a book on the origins of WWI that was widely reviewed in mass media, sold well, and won awards. The book is a detailed explanation of how Europe went to war in 1914 concentrating on decisions and actions. That is, it is a work of history (How did this happen?) rather than international relations (Why did this happen?)
By "sleepwalking" Clark meant that European leaders made decisions and took actions without thinking about their larger consequences, so the overall effect was that the stage was set for a great and destructive general war without anyone consciously desiring that result. The principal actors were "watchful but unseeing, haunted by dreams, yet blind to reality." He did not, however, mean that the decisions and actions themselves were unconscious or that no one is ultimately to blame for the war. Since the book came out, Clark has tried to clear up that misconception.
Perhaps the biggest example of sleepwalking is the parallel development of the Franco-Russian alliance and the Entente Cordiale between Britain and France. This created a framework in which Britain, France, and Russia were predisposed to align against Germany even though there were still grievances among the three powers and there were pro- and anti-war factions in each. The creation of this structure was incremental and driven by imperial as well as European concerns. At each stage it made sense, even though if you asked the men making the decisions (Clark acknowledges the gender dimension) at each stage whether they understood the potential for escalation of conflict they might not see it and would likely deny that was their intent.
So it is possible that the articles and books you mention are adopting or reacting to Clark's thesis in a sophisticated way. It is also possible that some author was aware of the book's title and simply decided to use the concept of "sleepwalking into war" without really understanding what Clark meant by it.