Causes of double vision can be many and include refractive error,corneal opacity, cataract, thyroid disease, weakness of 3rd, 4th or 6th cranial nerve etc. However, a transient episode of double vision as you are describing may have no clinical significance. It may happen due to loss of fusion mechanism of the central nervous system that maintains straightness. If it persists then you can see an ophthalmologist for an examination. Thanks and best wishes.
Please, click the ACCEPT BUTTON so that I can get my dues. BONUS and a POSITIVE FEEDBACK will be appreciated.