나머지 in that sentence means "a result"
~한 나머지 is an idiom means "as a result of ~, so ~ that"
지루한 나머지 means "as a result of boredom"
지루한 나머지 나는 옛 일기장을 꺼내 읽었다.
As a result of boredom, I took out my old diaries and read them.
I was so boring that I took out my old diaries and read them.