Paint the ceiling bright white to maximize the light in the room. Because bedrooms with sloped ceilings are usually small and tucked under the eaves of a house, you should do whatever you can to make them feel larger. A bright white ceiling will open up the space and reflect both daylight and artificial light to brighten up the room.
Paint the walls a light color to continue the process of making the room seem larger, but don't paint them the same color as the ceiling. The sloped part of the wall should be painted to match the ceiling rather than the wall, unless it is in a location that may get a lot of wear or contact from people. In this case, paint it to match the other walls so that it will be less likely to show stains and marks.
Carefully delineate the line between the two colors using a high-quality trim brush. Paint the corners and edges with the trim brush, and then complete the painting using a roller, bringing the roller as close to the edges as possible without leaving excess paint on the adjoining wall or ceiling.