This is very common. I have used many different sleep aids over the years, both OTC and prescription. I have had this same experience with some of the meds. Some meds will give a warning that you may experience vivid dreams. If the dreams are disturbing, you might want to try another sleep aid.
One possible reason for this, in my opinion, is that when you don't get a good night's sleep, you tend not to remember your dreams if you have them. If you are constantly waking during the night, your sleep cycle is disturbed and you may not be sleeping long enough at one time to enter a deep sleep, or REM cycle.
The sleep aid helps one get a good night's deep sleep, possibly for the first time in weeks or months, thus increasing the likelihood of having dreams and remembering them.
If the tylenol PM is helping you sleep, and the dreams are not disturbing to you, i.e. nightmares, you can probably safely continue to use them. The ingredient in one Tylenol PM is the same as taking one benadryl capsule and one extra strength tylenol. Very safe.
Sleep tight, and dream on.