It occurs to me that there are two kinds of boredom.
Type A Boredom is being bored because one has nothing to do.
Type B Boredom is being bored because one has a lot to do, but no interest in doing it.
I find that childhood contains abundant Type A Boredom, but as one grows up it is replaced by Type B Boredom. And I miss Type A Boredom. I can't remember the last time that I had nothing to do. (I can remember many recent times that I have done nothing, but there were always quite a few things that I should have been doing.)
I view Type A Boredom as primarily beneficial. I suppose that for some people it led them to do things like drive around breaking mail boxes with a baseball bat. But for me it put me in a position to try various non-destructive things that I had long wanted to do. And, if nothing else, it would have been a lot harder to go back to school in the fall if I hadn't been bored in the summer.