I have a 2002 MA that I added a retractable bunk bed. Gets lifted up to the ceiling for driving by a rotating shaft that winds seat belt material to lift the bunk to the roof. Only takes up about six inches of ceiling height and is on one side of the rig so doesn't affect any ceiling height for walking.
Cobbled together at the last minute for a trip and still needs to be cosmetically finished
But it's certainly possible and ended up being very practical.
There are pictures in my "Back from the Dead" long thread.