Typically, these incidents are handled by the Character Board rather than as a medical issue. My general understanding is that they will request a written description of the issue(s), including the facts, why you did it, what you learned from it, etc. It's not so much as you need a "waiver" as the Board decides whether you should be offered an appointment (assuming you are otherwise competitive for one).
I believe they don't get involved unless/until USNA indicates a desire to offer you an appointment but for this issue -- I could be wrong about that.
As to whether it will be an issue . . . factors that the Board probably will consider including when (at what age) the usage occurred, under what circumstances, whether any other bad conduct followed (e.g., destruction of property), etc. Of particular interest will likely be why it happened twice -- obviously, drug usage is a non-starter in the military and the Board will want to be sure that this is not likely to recur. Please note . . . I'm not suggesting you answer the above questions on this forum, merely that these are the types of things the Board will likely consider.
No one here can tell you how the Board will view your actions. You ARE right to disclose. And, whatever, you do, keep your nose clean from here on out.