At night when I'm sleeping I have to toss to different sides cause my hips start hurting what is it?

Arthritis. This is most likely due to degenerative joint disease such as rheumatoid arthritis which can be evaluated and treated by an orthopedic surgeon. Another possibility is bursitis or inflammation of the cushioning around the hip bone. If you do not have problems with stomach ulcers, anti-inflammatory medications such as motrin, Aleve or Celebrex (celecoxib) may help to relieve the pain.
Trochanteric pain? If the pain is reported over the hips, the likely cause is bursitis over the greater trochanter. This is more likely to cause tossing and turning in bed. True hip arthritis pain is reported as pain in the groin and is more likely to be on the opposite side from the side the patient lays on as internal rotation of the hip causes the nondependent side to be more painful.
Night Pain. This has many possibilities and needs to be evaluated by a medical doctor. Causes can range from pain in the hips or back from various types of arthritis (commonest is osteo-arthritis) to conditions like restless leg syndromes. These conditions are treated differently so that proper diagnosis is essential to helping you get well.