Musician Ozzy Osbourne has joked that the secret to his 35-year marriage is "don't get caught with your mistress".

The Black Sabbath singer made the quip during an interview with music magazine, Rolling Stone.

The 68-year-old has been married to X Factor judge Sharon Osbourne for 35 years and they have stayed together despite many difficulties, including an affair that Ozzy admitted to.

He told Rolling Stone when asked what their secret was: "Don't get caught with your mistress."

The rocker revealed in 2016 that he was undergoing "intense therapy" for a "sex addiction" that nearly resulted in the disintegration of his marriage to Sharon.

He said in a statement at the time that he was "mortified" at the effect of his behaviour on his family.

In May this year, the couple renewed their wedding vows in Las Vegas, an idea that Ozzy said was his.

He told Hello" magazine: "This is a new beginning. I think that everyone should reaffirm their marriage."

"I walked out of the ceremony feeling completely refreshed. I know my wife loves me and she knows how much I love her. I'm excited for whatever our future holds."

Sharon, 64, told Hello she felt "humiliated and belittled" by Ozzy's affair, but added: "Ozzy and I are interwoven."

The pair met in the 1970s via her father Don Arden, who was managing the heavy metal group at the time. The pair wed in 1982 and have three children together: Jack, Kelly and Aimee.

Ozzy told Rolling Stone: "When I was a crazy f*****, I'm lucky she didn't walk out.

"Now I'm coming on five years clean and sober, and I've realised what a f****** idiot I was. I mean, I'm still nuts, but in control of it a bit more.

"When I said, "Don't get caught by your missus," I'm not proud of all that s***.

"I upset my wife and I upset my family and I made a lot of shock and shame. I love my wife, and it made me realise what a f****** idiot I've been."

Ozzy also told the magazine he paints to relax these days and that he is "obsessed with Game of Thrones".