I've been there. I had a job that, on average, took 2 hours per day to fulfill. I was well-compensated, but was bored out of my mind. At times it was so slow I looked foward to meetings, and I hate meetings. When I complained about it to someone close to me, he said "invest in yourself." I did a lot of what others have suggested:
--I did the best job I could on the tasks I had.
--company trainings (free cookies and soda and lunch! But there were only so many classes to take)
--asking to help others with their work - I was young and inexperienced, and so had little to offer. And nobody wanted me billing hours to their project
--a side gig. I did a little of this, although I always felt a little guilty. Looking back, as long as I was doing my job well, I shouldn't have worried.
--learning new skills (as part of the side gig) - I developed some technical skills that led to my current position.
And one regret:
--wasted a whole lot of time surfing the internet. Sure, I learned a lot, but I also developed some bad work habits as a result, which I've had to unlearn.
If I had had the opportunity to WFH, it would have been awesome.
Eventually, I left that job at Megacorp to work at a startup. Took a 25% cut in pay/benefits. Cut my commute from 25-30 minutes down to <10. Goodbye to all the idle time, but the work was stimulating, interesting, and fun. And those skills I learned as part of my side gig? Well, they've come very much in handy.