The episode of Don't Make Me Laugh, which sees comedians discuss topics without causing the audience to chuckle, went out on 21 April.
It included the subject "The Queen must have had sex at least four times."
The BBC received over 100 complaints and apologised the following day.
After presenter David Baddiel introduced the subject, panellists - including comedian Russell Kane - made sex-based jokes about the Queen and the Duke of Edinburgh that the BBC Trust ruled were "personal, intrusive and demeaning".
In its findings, the trust stated "the offence felt was compounded by the date of the programme's transmission", but added it would be "hard to imagine circumstances in which this broadcast at any time or on any day would not have given rise to significant unjustified offence".
In apologising for the show, a BBC spokesman said: "We never intended for the scheduling of the programme to coincide with The Queen's birthday and are sorry for the offence caused by its timing and content."
He added that BBC Radio 4 comedy was "a broad church and often pushes boundaries".
Follow us on Twitter @BBCNewsEnts, on Instagram at bbcnewsents, or email entertainment.news@bbc.co.uk.
A BBC Radio 4 show broadcast on the Queen's 90th birthday that included jokes about her sex life was in "serious breach" of editorial guidelines, the BBC Trust has ruled.