Universal interventions to promote inclusivity and acceptance of diverse sexual and gender identities in schools could help to prevent mental health problems in this population. We reviewed evidence and developed programme theories to explain which universal interventions work, for whom, in which contexts and why. We conducted a rapid realist review and extracted data in context-mechanism-outcome configurations, to develop and refine programme theories. We included 53 sources and identified five intervention themes: student pride clubs, inclusive antibullying and harassment policies, inclusive curricula, workshops and staff training. Here, we show that these interventions could work by reducing discrimination, bullying and marginalization. Interventions appear to work best when school staff are trained and the school climate is supportive and may be less effective for boys, gender minority students and bisexual students. Our findings provide guiding principles for schools to develop interventions and should encourage primary research to confirm, refute or refine our programme theories