I don't know if he is gay or bi, but I know people do a lot of things while on drugs. Their inhibitions go out the window. It is also not uncommon for people on drugs to prostitute themselves out for more drugs (not everyone does it, but a lot do). At the time, he probably wasn't even thinking of it as a sexual act. He was thinking about the drugs. I sincerely hope that he is clean now and all of that is behind him.
Is there anything else in his behavior or things he says that make you suspect he may be gay or bi? I'm not talking stereotypes like going to musicals and stuff like that. I mean things like do you see him looking at other men? Does he have any gay pornography on his computer? Do you have a normal sex life with him? Do you turn him on? Does he comment on how sexy you are?
I would also say that if you still suspect something, don't confront him. If he does have those feelings/thoughts, he may be confused or ashamed. Just try to be as understanding and non-judgmental as possible. If this and other things start to disrupt your relationship, couples counciling may be in order, as well.
Good luck.