Overuse of a muscle, dehydration, muscle strain or simply holding a position for a prolonged period can cause a muscle cramp. In many cases, however, the cause isn't known. Although most muscle cramps are harmless, some may be related to an underlying medical condition, such as: Inadequate blood supply.