Lots of great advice so far.
You'd better sit down for this one.
The exact dimensions should be 0.5*H minus the hypotenuse of the mattress thickness if your torso is less than TH.
Got that?
Seriously, you should sit down for this one.
Without knowing ANY of your specfics, generally,
1. Measure your inside height in the van, floor to roof.
2. Subtract any further construction dimensions that might reduce it, flooring, insulation, ceiling.
3. Go sit down and ponder the meaning of life with an iced tea. Oh, and while you're at it, measure from the seat to the top of your head. Your sitting height.
4. Total Inside van height minus your sitting height minus mattress thickness is your max potential bed height for the bed.
This will allow you to get up in the middle of the night for a pee without getting a headache from clanking your head on the ceiling causing you to lose control at the most inopportune moment. Or chase mice looking for where you hide your Doritos in the dark.
5. Then you can decide how much room you have under the bed and what to do with storage. Boxed plywood bed support with lift up lid for access or open raised platform with legs allowing slide under storage bins are two most common.
6. But there are always exceptions. Some want max storage space and so choose min over bed height and rolling out of bed instead of sitting up to get Max storage under bed.
7. Some use a hammock or bed lowered from the ceiling. Some have storage over the feet/ head of the bed and enough other storage that they put the bed low.
Many options and we don't even know what type of van you have, or how vertically challenged you are, packrat tendencies, if you even like Doritos,...
It is all really a function of total space, personal preference, physical size, storage requirements.