Finding the right stimulation

Usually when having sex I feel pretty comfortable throughout the session, but sometimes changing the position or a slight change in angle can cause me to start going soft. It feels like the stimulation is not enough even if we have done that position before hand during the session. After that it is really difficult to get hard again even if in my head I still am horny.