Green’s Dictionary of Slang

top floor n.

SE in slang uses

In phrases

have a vacancy on the top floor (v.)

(US) to be stupid, i.e. ‘not all there’.

[US]J. Sayles Union Dues (1978) 316: She [...] turned and went back in. The glass slid shut. ‘Vacancy on the top floor,’ said jackie.