You may want to review How to Set Up a Drum Kit to do this properly.

One exercise is the “heel-toe” - starting with an open hi-hat and your toe pointed up, bring your toe down to close the hi-hat. Simultaneously, point your heel up. Then, switch again. After practicing this rhythmically for a minute or two, the muscles in your lower leg will start to burn. You will soon be able to do this for longer and longer, becoming more efficient in using the hi-hat pedal for long time periods.