Ideally, you want at least 33 to 36 inches of space between the top of your mattress and the ceiling to avoid feeling cramped or hitting your head.