Gap above your head, sitting up
Ceiling above the low end of the bed

A 200 cm long bed, drawn side-on. The ceiling stops rising at 260 cm. The person sits about 20 cm away from the headboard, leaning on pillows. A comfort margin of about 10 cm is my rule of thumb, not a standard.