Hi Dierdre,
The purpose of the Epley maneuver is to reposition the crystals in a person's ear that are causing symptoms such as vertigo, dizziness and nausea. If the Epley maneuver resolved your vertigo, it suggests some of your ear crystals had gone astray. The timing may have been coincidental and the dizziness may simply have been due to the ear infection.
You'll know for sure if you have a recurrence. I hope you don't.
Glad you're feeling better.
Edited to add that, yes, BPPV can be triggered by an ear infection, viral infection, head injury, keeping the head in the same position for a long time, such as in the dentist chair, etc.