I had same happen to me when I added three inch of foam topper. I can in to the top of mattress thru the open access door and I see both ceiling actually touching the top of foam topper. After seeing this I always do a double take that ceilings lights cannot be turned ON. If I was still using the automotive very hot incandescent light bulbs this could be a serious heat problem for the topper and would melt something for sure... Fortunate for me the LEDs I have installed in the same ceiling lights housing do not get that hot anymore.
When I was using the very hot incandescent 12V bulbs the ceiling area under my lamp housing is all scored from the resulted heat. This was one of the main reasons I changed out the automotive type hot bulbs.
I guess with all of this in mind one probably should wait a couple of minutes after turning off the ceiling lights if you still using the automotive type very hot bulbs before bringing the roof down on top of the tent bed mattress...
My ceiling lights disconnect switch is a push button type switch in the top of the sink cabinet. When the fold over portion of the sink is set up this action will push in the ceiling light push button switch. This is a safety feature installed by Starcraft... Neat being automated so that one doesn't have to remember to make sure the ceiling lights are OFF before lowering the top down. Possible fire hazard for sure... Other popup trailers may do this differently.
I also have installed the two foot carpet square rug sections on top of the wood platform for the tent bed ends. This probably adds another 1/2-inch or more to the top of the tent bed mattress and topper as well.
Pushing down on the top is what I do here as well to get the roof latches to engage. So far no issues with doing this...
My ceiling also has one of those fold down hanger arrangement. I have to make sure this is folded up against the ceiling before lowering the top as well Similar to this photo..
Roy Ken