He’s the ghost of a student from a different school who lies in the bed of Sankai High’s infirmary.
He considered his childhood friend named Akira, who was his classmate from elementary to high school, his rival since Akira always out-performed him on everything including exams. In his last year in High school, since she said she would not date him, he hoped not to be on the same university as Akira aimed to, and pushed himself so hard without sleeping in his studies for another university entrance exam that was out of his reach, that he collapsed and was laid to bed at the school infirmary. Akira came and got onto him for studying too hard to the detriment of his own health, and he passed out when she explained why she would not date him.
His spirit lingered as he wonders what Akira’s last sentence meant, and somehow got himself to a bed at the infirmary of Sankai High around 2 or 3 days ago, since he felt stupid not having slept, and he has been throwing any students who’d lie down on the bed. After Rinne listened to his story and figured his lingering attachment, he claimed that she must have been waiting until the exams were over to date him, so he would happily pass on and so Rinne could take the bed for himself.