Bunk beds

What is a good age for kids to start sleeping in a bunk bed on the top part ? An age that they won't fall anymore?