Sleeping bags are going to end up getting dirty when you are using them for camping. You do not have to clean your sleeping bag each time you use it, but at some point in time you are going to need to get it properly cleaned.
First of all, do a spot cleaning when you can. This means washing off any stains that you might have got on it. This is a simple process that you can do without a full cleaning.
You can hand wash or machine wash most sleeping bags. Follow the instructions on the tag to make sure you are not doing something that is going to damage the sleeping bag. Some bags with special filling have issues with washing machines.
Try to use safe soaps. Don't ever use bleach. Do not use fabric softener on your sleeping bag. You do not want anything too harsh that will ruin your sleeping bag.
If you can machine wash your specific bag, you are going to want to run it through the washing machine like normal once. You are then going to want to run it through a second rinse cycle since you need to make sure all the soap is out of the bag.
When the bag is wet, be careful about how you handle it. It is very easy to stretch and warp or even rip the bag if you are not careful. Hold the bag on both ends supporting all the weight in the middle as well all at the same time.
Try to hand squeeze out as much water as possible. This is a messy process but one of the best ways of getting it dry.
Some bags with synthetic materials will be ruined if you use them in a dryer. Only use in a dryer if the tag says you can. Otherwise you are going to have to lay the bag out to help it dry. Use fans on it or use the sun.