I agree with dame_wilbur! Tylenol is a known migraine trigger and it is known to cause rebound headaches.
What is usually mixed in tylenol PM to make it the "PM" part is actually a medicine that is used for allergies normally, called "Benadryl" as a brand name or "Diphenhydramine hydrochloride" under the generic name. You should check to see if that is what is in your Tylenol PM (it is different in different countries). There are medications within the same class as benadryl that can actually help migraine pain in some people, and I have heard it theorized that benadryl itself could possibly help migraine pain in some people... although it is NOT a proven or prescribed treatment by any means. You may want to see what the dose of the "Diphenhydramine hydrochloride" was in your Tylenol PM as that is the only part that makes you sleepy anyway and if it is possible, buy a pure benadryl product in that same dosage if a doctor or a pharmacist were to say that was okay as well. Mind you, it has also been shown that most people become sort of immune to the sleepy effects of the benadryl after 3 days... so really, the Tylenol PM was probably having more of a "placebo effect" than a physiological effect in terms of sleep if you were taking it daily for a prolonged period of time... unless it was helping your pain... but, like with so many OTC meds, Advil is another famouos OTC med that triggers migraines and causes rebound headaches, it could have also been the cause of the original pain or it could have been amplifying the pain if it was also temporarily removing it at night.
So, it would be a good idea to cut back on the Tylenol PM in the hopes of reducing it until you were not taking it at all anymore, then you might find that your headaches go away entirely.
YES! You can definitely get rebounds from Tylenol PM. I'd recommend stop taking it ASAP.