If they were in your pants, your prayers were valid and correct. But if it was on your underwear and it was dry sperm, then you should make ghusul and pray all the prayers again since you had woken up.
If they were in your pants, your prayers were valid and correct. But if it was on your underwear and it was dry sperm, then you should make ghusul and pray all the prayers again since you had woken up.