Electricity power off in some bed rooms and back again regularly each night but breakers are still on
This can be every thing from a failing supply to the home, knocking out 1 leg to a daisy chained set of outlets that has a bad connection.  First I would see if the problem is on multiple breakers if it is all odd or all even breakers get the power company involved because this would indicate a serious problem with your service. If it is only 1 breaker that the problem is associated with it can be a weak connection at the breaker but more likely in my experience is a daisy chained outlet that uses back stabs is failing or a loose wire nut / broken wire when the connection gets hot it opens. This is also a concern as there is usually arcing. If this is the case it can usually be traced to 1 outlet or junction in a box with an outlet or switch. When the power goes out work towards the service panel looking for the last place there is power. Once the first no power outlet is found the problem will be there or the outlet before it. With the breaker off pull the outlet and inspect the connections, if back stabs are used pulling the outlet can at times temporally fix the problem until a large load causes it to start failing again. I recommend replacing outlets that have had this issue because you don't know how much damage occoured inside. I use the screw connectors on outlets and switches because I have repaired hundreds of failed backstab outlets and switches over the years.