In the context of people going to bed we usually use "ÎN / DIN", because these words have the sense of insideness. We more or less dip into the soft elastic mattress, so even though we are still ON the bed (as opposed to being under), we are to some extent INSIDE.
On the other hand, we don't dip into the table, because tables are generally hard objects.
For the same reason "Mergem PRIN iarbă." (literally "We walk through the grass." | our feet are dipped into the grass; the grass is not just under our feet, but around our feet as well). However, "Mergem PE pământ." (We walk on the earth.) But if it has just rained, then "Mergem PRIN noroi." (We walk through the mud.)
Eu o să mă urc ÎN şi o să cad DIN: pat (bed), copac (tree), pod (attic), maşină (car - inside).
Eu o să mă urc PE şi o să cad DE PE: masă (table), acoperiş (roof), pod (bridge), maşină (car - outside).