If I was to have an aft under cockpit berth then I would go athwartships as per Valiente's idea and at least your head and torso would not be completely under the cockpit sole.
The payoff here from a practical point of view is that the bed itself can be pretty wide...about five feet and a bit...which rivals a queen-sized bed shoreside. The other thing to consider is that the forward edge of the "cockpit well" can make a handy place to mount a relatively short (20 inches or so) lee cloth that drops 24 inches to the leading edge of the bed base. Lee cloths here of course, are not as necessary as they are in a port/starboard side sea berth, because if the boat is pitching that much, you aren't liable to be attempting to sleep in the end. But a cloth in that position could have bags, hooks, or grommets with shock cord, providing a handy vertical surface for shoes, hats, socks, etc. that can, if needed, fold out of the way.
We are trying to think along these lines: when on passage, what better use can a five by six foot flat surface in the end of the boat be put than just to lie empty? Obviously, we don't want a load of weight back there, but at the same time, it's a big piece of boat real estate to go unused.
On passage, the likelihood of that aft cabin being used for sleep is low: off watch sleepers are going to head for a low-side bunk.
Anyway, at some point, I'm going to have to hire a cabinetmaker, because woodworking is not a skill I possess.