Here is what I did,
take a piece of Lexan and turn one end up to 1/4" less than the thickness of your mattress. Now cut a double dense y foam the height of your mattress, the other width/size of this foam is what you will fell you need for a comfortable foot/ankle support while stretch out on your side of the bed,. sticking out from the mattress bottom. Now for one of the other sizes of this lexan, This has to be long enough,,,, to be able to support your foam's length and width and to be able to slide under your mattress a distance/length to do so.
When not in use remove the foam and slide Lexan forward under you mattress untill the angle rest agaist the mattress bottom side.