I absolutely believe that what we are dealing with in our everyday life carries over when we are sleeping. I don't think that we dream exact scenarios though. I do believe they are distorted versions of what is bothering us during waking hours which is what Sparky said when he mentioned dreaming about crazy stuff. I only say this because when I was worried about my son's high school grades (or lack of good grades) I started to wake up in a panic from dreams I was having. I can't remember now whether I remembered them or not at the time but I do remember waking up with my heart feeling like it was going to pound out of my chest. As I'm not a guy, I can't say much about waking up with an erection but I am married to one and he does wake up with an erection. I think it is part of the male biology.
Finally! I have found somebody else with this exact same phenomenon as me! While waking up or while half-asleep, I would have gay thoughts that would give me an erection and this happens on a daily basis. Every time I would used to check to see if I was actually gay by checking internet gay porn, I would lose my erection/never get one (I've stopped since I started my reboot nearly a week ago).
This is the ONE barrier that prevents me from truly pulling this HOCD off of me. I desperately need somebody to explain this phenomenon.
It's common for men to get erections in their sleep. It sometimes happens even when you aren't dreaming about anything sexual. I forget the exact biological reason why it happens, but it is common. You can test it for yourself - put a small bandaid or piece of tape on the side of your flaccid penis before you go to sleep. When you wake up, it will be loose because you will have gotten and erection during the night, pulling the bandaid loose. This is actually a test that doctors have patients with suspected erectile dysfunction try.
I haven't read your other post, but I would think that if you have had sex with women and enjoyed it, you are not gay. Gay men are sexually aroused by other men and women do nothing for them. If you have watched gay porn and feel no arousal, that is a pretty good test.
I wouldn't put too much stock in dreams either. They really have no connection to real life and are not a reflection of anything in your subconscious. If it was, I would be seriously worried about myself as I dream about some crazy stuff sometimes. If you sleep 8 hours a night, you have about 12 dreams a night as your drop into REM sleep every 40 minutes (you dream during REM sleep). You usually only remember the last dream you had before you wake up.