Well As a massage therapist the Extensor Longus group in your lower leg is a group that causes "Night cramps". It's caused by a trigger point located in the lateral aspect of your lower leg. If the pain radiates on top of the large toe it is the Extensor Hallucis Longus muscle, if it radiates on top of and down the other four toes it is the Extensor Digitorum Longus. The other is your Gastrocnemius. If you hold this muscle in plantar flexion to long (Which you could do while you are sleeping, driving for long periods of time, high heels, climbing steep slopes, riding a bike with the seat to low can activate trigger points in it) and it can cause nocturnal night cramps. Tensing and relaxing that muscle is beneficial for a self-care exercise. The pain can radiate from this into the back of the knee, along the posterior lower leg, and into the bottom of the foot. If you stand for long periods of time also this muscle can be tight due to it stabalizing the tendency to forward lean against gravity.
So you could ice (15-20 minutes) and stretch it by sitting on the floor and placing a thera band around the sole of your foot, gripping the handles with your hands, and pulling the band back to you and holding it, then as it relaxes let go contract the muscle and hold it for a few seconds (10) and take a breath and as you exhale bring it back into a stretch as it relaxes this time, bring it further into the stretch upon your exhale. That will help loosen it up. You can also follow up with heat application .