There are some similar products sold today. Expensive for the (lack of) sleeping volume, but are used for meeting DOT requirements.
30 years ago, some truck cap dealers also sold cab-camper boots, but the boots aren't as common as they used to be. The curves common in truck rear windows today hasn't helped the situation.
A truck sunroof, depending on the user and on the size of the sunroof, might work very well for some people.
Windshields and (I believe) rear windows are part of the rollover protection, which I suspect has lead to tiny openings, or no openings, in truck rear windows.
I've thought about using aluminum to replace the rear truck window, thick enough to emulate the "protection" of the glass, with a large opening and a "lip" for securing an accordion boot to the aluminum.