You have a couple of choices to level your ladder. Either dig back one side to get a level spot or use ladder leg levelers on the extension ladder.
Below is a picture of one type I use. They work great, but you can't use them with large ladders (32 or 40 foot). Another type is offered by Warner and they work well. Each type should offer you stability on your sloping ground.