The second method is: lean forward against the wall and touch the ground with your heel. It's also helpful to just stand and then focus on the cramped leg, but you should be careful to fall: it would be better if someone could help you. Heating (using electric blanket or warm water but not boiling water) or massaging your legs and feet can also help to relax your muscles, but it is best to try to stretch them first.