The height is very often determined by the floor size. In general you do not need to have it higher than 3 feet. Also depending on your interior coop height. Another important factor is the amount of space above chickens heads to open venting. Ventilation is extremely important regardless of location, and weather. Different techniques are used for hot and cold. You do not have your location in profile, so I am not going to elaborate on that much more. It is also something you may already have under control.
Getting back to roost height, it is important for it to be reasonably positioned, so when chickens fly down,,,,,, they do not crash into walls.
Using a 2 x 4 is fine for the roost. There are peeps on both sides as regards to position. Some like flat side up. Some like narrow side up. The size of your chickens may be a factor on orientation placement.
I personally use round tree branches with bark as roost. I do not have any sharp edges/knots on those.
WISHING YOU BEST,,,,,,,,,,,,,, and
