J.P.
When my kids were that age, I bought them each an alarm clock (a digital one) and put it in their rooms. They knew their numbers so I told them, that they had to stay in bed until - the clock said "7" in the first spot - and showed them where to look. If it said "7" there - then they could get out of bed. If it didn't say "7" then they had to lay in bed quietly reading a book or something until it said "7". They could get up and get a book and get back in bed, or they could go to the bathroom and get back in bed, but they could not get out of bed and play until the clock said "7". That worked for me. Maybe that would work for you? Good luck!