I cannot speak for every academy; however, I would imagine each would have this similar policy. Medication will usually be taken from all entering cadets/midshipmen. This includes any OTC's and prescription medicine. If it is prescription it will either be given back to the person or given to them at the appropriate time. If it is OTC it will usually be confiscated. This only applies to the indoctrination periods. Once out of this period they will likely be able to get any OTC med they need. One way as mentioned is through the mid/cadet store. The other option is since they are now members of the military is to go to the clinic and ask for some. Most military clinics will give some OTC's without seeing the doctor.
The reason for no OTC's during indoctrination is simply because the Academy won't know what they are taking and this can be dangerous. For example, if someone is out running and physically active all day and downing Motrin there can be some serious stomach and kidney problems.
As KP2001 states, when you show up on I/R-day, all medication OTC and prescription, is taken away from you. For prescription medications, a new prescription will be written and filled that day. For OTC medications you can stop by the clinic and pick up some OTC meds, others you will need to see corpsman or physician for. You can also purchase some of the OTC's as needed.
The Docs are spot on. But if stopping by the clinic to get a Tylenol for a simple head-ache or some such becomes a trial, then just tell your Parents to send you a care package later on. I just sent a bottle of Tylenol, Nyquil, & the pink stomach stuff just so he could have it on hand. Even though he'd had that trusty flu shot...... Well.... ya know..... I only know this to be true at KP and USNA so.....