I'm not sure how long you mean by "periods of time," but I know sometimes when I'm having sex I feel like I'm getting close to orgasm and then it just goes away. In those cases, I just let my boyfriend know it's not going to happen and after he comes we'll get me off in a different way, usually something that has more clitoral stimulation.
Depending on how long you're talking about, it might have something to do with your hormones and where in your cycle you are. I know my sex drive varies based on that sometimes.