If I didn't know him, I would probably just ignore him, hoping it wasn't me causing it, and then I'd hope he wasn't hanging around or coming to my blanket.
If I knew him, I'd be hoping it was me causing his erection, and I'd have a little wardrobe accident to see if he notices - then I would innocently say Hi. And see what happens.