Sexual dysfunction occurs when there is a problem that prevents you from enjoying or wanting sexual actility. Sexual dysfunction can happen to all ages and genders. Some common causes of sexual dysfunction include: past sexual trauma, poor mental health, heart disease and other cardiovascular disorders, substance use, diabetes and certain medications.