Two out of five hospital trusts and health boards in the UK do not give sanitary products to patients who need them, or only in emergencies, an investigation by the BMA has found.
The doctors' union says pads and tampons are a basic need and should be available free to inpatients.
But in some trusts, razors and shaving foam were handed out free while sanitary products were not.
The BMA has written to NHS England asking for action to be taken.
The BMA asked a total of 223 trusts and health boards across the UK about the policy towards supplying sanitary products.
Out of 187 who responded, 104 said they did supply them.
But 25 said they did not supply them at all and 54 said they did, but only in emergencies or in small amounts.
None of the trusts and health boards which responded said they had a policy on when sanitary products were handed out.
And at 27 trusts, there was nowhere to buy sanitary products anywhere on site.
The BMA's investigation is part of a wider campaign to end period poverty, which focuses on making sanitary items more affordable.
Eleanor Wilson, a member of the BMA medical students' committee, said: "When patients are under our care in the NHS, we need to make sure that we make them feel as welcome and as looked after as possible.
"By not providing them with something so key to their health and wellbeing, it has a big impact on their sense of self-worth - we are effectively withholding that dignity from them.
"While some hospitals have good provision, in others, patients have had to face embarrassment and hope that relatives can bring them in.
"For some that is not an option, and it can often become more challenging for young and teenage paediatric patients."
She said sanitary products should be part of a basic package including toilet paper, food, razors and shaving foam, made available to patients when they go into hospital.
Tackling period poverty
The BMA also says the impact on the wellbeing of a patient far outweighed the relatively small cost to the NHS.
Prof Dame Parveen Kumar, chair of the BMA board of science, said hospitals should provide clear information on how patients can access sanitary products during their stay in hospital.
"Hospitals have an opportunity to lead the way in tackling period poverty and should be a shining example of the progress that can be made on this important issue."