From Smithsonian:
“Boredom” first became a word in 1852, with the publication of Charles Dickens’ convoluted (and sometimes boring) serial, Bleak House; as an emotional state, it obviously dates back a lot further. Roman philosopher Seneca talks about boredom as a kind of nausea, while Greek historian Plutarch notes that Pyrrhus (he of the “Pyrrhic victory”) became desperately bored in his retirement. Dr. Peter Toohey, a Classics professor at the University of Calgary, traced the path of being bored in 2011 in Boredom: A Lively History. Among the stories he uncovered was one from the 2nd century AD in which one Roman official was memorialized with a public inscription for rescuing an entire town from boredom (the Latin taedia), though exactly how is lost to the ages. And the vast amount of ancient graffiti on Roman walls is a testament to the fact that teenagers in every era deface property when they have nothing else to do.
In Christian tradition, chronic boredom was “acedia”, a sin that’s sort of a proto-sloth. The “noonday demon”, as one of its early chroniclers called it, refers to a state of being simultaneously listless and restless and was often ascribed to monks and other people who led cloistered lives. By the Renaissance, it had morphed from a demon-induced sin into melancholia, a depression brought on by too aggressive study of maths and sciences; later, it was the French ennui. In the 18th century, boredom became a punitive tool, although the Quakers who built the first “penitentiary” probably didn’t see it that way. In 1790, they constructed a prison in Philadelphia in which inmates were kept in isolation at all hours of the day. The idea was that the silence would help them to seek forgiveness from God. In reality, it just drove them insane.
More here.