Diphenydramine is the same active ingredient in OTC sleep medication.
Diphenydramine is definitely habit forming and you will become physically and mentally dependent.
I have a friend who was addicted to Benadryl for a year+.
There could be a psychological dependence where the individual believes it helps, and thinks them self into "I can't sleep" when they know they didn't take it. (Reverse placebo.). But, two pharmacists told me it doesn't create a chemical dependence where you can't sleep without it. And, dependence is not what I've experienced using it as a sleep aid (off and on) for 6 years. And, it's not
what I've found in google searches (<<link). Tolerance (i.e., doesn't have the knock out it used to) can occur. But, that's not the same as requiring continued use just to sleep.
If taken for allergies, a dependence might occur. Or, if taken more than suggested doses
I don't recommend taking it every night (in perpetuity) just because I don't think it's a good idea to fill our bodies with meds that aren't needed. But, to help take the edge off the new sensation of ear plugs, or the night before an important activity, or a new fan noise in the bedroom.
I'd also throw in some camomile tea before bed. Or, when stopping diphenhydramine and if there's a concern for the psychological dependence.