I think it's interesting that the medication Diphenhydramine (used in Benadryl, Tylenol PM, etc.) is often used for its side effect as opposed to its primary effect.  It's classified as an antihistamine, which means it's for allergies.  But its main side effect is drowsiness, which is why it's used in all those sleep aids.