Alex Neil opened the Royal Victoria Building in Edinburgh on Tuesday – and breached NHS guidelines by sitting on a bed.
The new building was designed with single rooms throughout, rather than shared wards, to reduce the risk of healthcare associated infections (HAIs).
A Scottish Government spokeswoman said Mr Neil spotted his error immediately, and the sheets were quickly changed.
Cases of deadly MRSA have reduced by 81.5% in the last seven years, from 1002 cases in 2005 to 185 last year, but Alex Salmond said more can still be done.
The incident was exposed at First Minister's Questions yesterday during an exchange about Scotland's battle against HAIs, as Conservative deputy leader Jackson Carlaw raised the issue with Alex Salmond.