A 39-year-old man who got into trouble while diving with friends at Rottnest Island in Western Australia has died in hospital.

Police say the man was diving with two friends off Rottnest yesterday when he surfaced and reported feeling unwell.

He was taken to the jetty at Thompson Bay but lapsed into unconsciousness.

He was transferred to the hyperbaric chamber at Fremantle Hospital by rescue helicopter but died overnight.

The man was one of three people admitted to hospital yesterday during diving incidents off Rottnest.

The island, which is 19 kilometres off the coast of Perth, is a popular tourist, swimming, fishing, and diving destination.

A 40-year-old woman came to the surface in difficulty and was treated on the island at the nursing post.

She was then flown to Fremantle by the rescue helicopter and remains in the decompression chamber.

And a 66-year-old man was treated at the nursing post after he was believed to have surfaced too fast.

Police say the man appears to be in reasonable condition and it is expected he will be flown from the island by the Royal Flying Doctor Service.