Yes they do share the same function. Both are a way in which your body rids itself of old sperm. Sperm can only stay "alive" for so long and the older they get the less capable they are of swimming, fertilizing, and killing/blocking other sperm and thus the less useful they are. Your body needs a way to purge itself of older, aging sperm so we have masturbation and nocturnal emissions (wet-dreams).Groovy said:Btw, do you happen to think that wet dreams have the same effect as MB? It's quite different. Wet dreams don't have the "withdrawal period".
One way or another your body is going to get it out of you. You may as well do it the fun way... out of those two options I mean .
Hell read "Sperm Wars" by Robin Baker. Great book. Not only does it explain this topic, but you'll learn a lot of cool things about human sexuality and human nature. Be warned though, it will change the way you think about sex and about women. (Actually, if you're a member of the "evolution is BS" crowd don't bother, the book will just piss you off)