How are you?
There can be many causes of diplopia like head injury, alcohol
intoxication, certain medications like phenytoin, zonisamide, sleep aid like lunesta (zolpidem).
Since you have double vision associated with headache, it seems to be due to migraine.
Migraine can cause a variety of visual disturbances.
Please consult a headache specialist as the exact cause can be identified only after clinical examination. Take care!