If you're struggling in your relationship with him, then it could be a sign of his true sexuality and he's trying to let you know. If your relationship is good, you should be enthused that he trusted in you enough to admit something that was pretty risky to admit.
You have to consider his age too. If he is young, his hormones are raging. Hell, in my teens & 20s, I would've gotten erect if a crocodile stroked my penis with a cheese grater.

Guys are horn dawgs for sexual satisfaction and it doesn't take much to get them worked up.