Serious question.

Why is it that a guy will be horny for a few minutes during sex and then it becomes difficult to get hard again? When a guy smokes weed does it make this happen?