Objective: How to insure a child's roof is child proofed?

Which of the following solutions is more sound in terms of naive physics reasoning?
use some foam and place it gently against the edges of sharp surfaces