The trade union Unison said seven sites opened at the start of the year and will run for three months, in partnership with local charities.
Tracy Anne Miller, Unison Lothian’s health branch secretary, said the “food pantries” started after stories emerged on social media of staff struggling to pay their bills.
She told The Scotsman: “We introduced seven food pantries across the NHS Lothians. We are working in partnership with the NHS Lothian Charity, and both the Edinburgh and East Lothian food projects – two local charities and I can’t thank them enough for the work they have put into organising this project.
“We have agreed to run them for three months and review them in March. The pantries started after some difficult stories were on our social media from staff who were struggling to pay their bills. We felt we could try and do more to support them. We decided to run the pantries over the winter months as these would be when people were struggling to meet energy costs and other costs after Christmas.
“We are not claiming that NHS staff are struggling more than anyone else. Just like everyone else some NHS staff are struggling, with transport, energy and food bills. And we thought we could help.
"Due to the unsocial nature of staff shift patterns, it’s harder for them to access pantries in the communities. The evidence so far is that the food pantries have steady use and will hopefully get our staff through the winter months when energy bills are higher. They are being used and we have anecdotal evidence of those staff visiting the pantries being very grateful for them being there. But let’s see what the review says in March.”
The food banks are located at sites including the Royal Infirmary of Edinburgh, Western General Hospital, Astley Ainslie Hospital, St John's Hospital, the Midlothian Community Hospital and the East Lothian Community Hospital.
Jackie Baillie, Scottish Labour’s deputy leader and health spokeswoman, said it was an “absolute indictment of this SNP Government that those most devoted to our NHS are now reliant on food banks just to feed themselves and their family”.
She said: "This is a sadly not a surprising outcome given that the pay negotiations for nurses have amounted to a real-terms pay cut. Not only have conditions worsened for staff amidst growing pressures on the NHS, but they are being abandoned by the SNP to weather the cost of living crisis without support.
"Sadly we will likely see more of this as the cost of living crisis continues, especially when [SNP health secretary] Humza Yousaf refuses to listen to concerns facing staff and fails to deliver fair pay."
Tens of thousands of nurses and ambulance staff in England are set to walk out this week amid a dispute over pay. Negotiations are continuing in Scotland, where strike action was put on hold last month.