If this is the same set up as mine, (when the bed comes down, the middle back rests fold over towards the wall to make a couch on either side and the table goes in the middle?) a buddy helped me with this.
we found where the electric stop switches were located and removed the mounting screws. then dropped the bed to the floor with the support legs down until they touched. Carefully measured where to drill new holes to put the switch and then re-mounted the stop switches so that when the bed was lowered to the floor with the supports down, it would stop at just the right height. This same process was repeated to get the bed/split dinette to go as far to the ceiling as it would go safely.
I had to modify the roof supports of my golf cart slightly to get it to go into the back but I now know that I have maximized the garage area as much as i can and know what will and will not fit. Another thing that I also did was the brackets that the bed actually screws into... I flipped those around and that gave me a few inches of rise toward the ceiling so i didn't have to mount the stop switches so high.
I hope this helps or gives you some insight as to what can be done to achieve the desired result.