Kids of different genders sharing a room

Ki

We currently live in a 3 bedroom apartment. 1 bedroom for my 2 girls (ages 5 and 2) and 1 for my son (age 4) and 1 for me and hubby. Space is limited. I’ve really been considering moving all my kids into 1 room and using the other room as a play room. We currently have a set of bunk beds so my older two would use those and my youngest is still in a crib. Do you think it’s ok for kids of different genders to share a room? Also, if you have successfully done this, how did you get your kids to sleep. I don’t want them to get up and play, when it’s bedtime.