Alan Ostler, 32, of Uxbridge, north west London, who was an assistant technical instructor at the hospital in Berkshire, pled guilty to misconduct in public office on November 29 last year.
In 2008, Ostler provided information to tabloid newspapers about patients at the high security psychiatric hospital, the Old Bailey heard.
His information, which he tried to sell, contributed to the publication of a story headlined 'Rape fantasy fiend given NHS sex swap'.
It was about a female patient who underwent gender realignment to become a man and then later wanted to change back.
Despite asking for money, Ostler never received payment for the story as it was confirmed by another source, the court heard.
Ostler was sentenced at the Old Bailey to seven months imprisonment suspended for 18 months, plus 150 hours unpaid work in the community.