While, the constitution does provide for suspension of habeas corpus, its a power rarely used. Lincoln suspended habeas corpus for Maryland -- mainly to keep the state assembly from seceding and in parts of the midwestern states. Eventually, SCOTUS declared the suspension unconstitutional and voided all military courts on civilian matters.
President Bush suspended habeas corpus for alien combatants caught on the battlefield.
There is no constitutional power for a president to declare martial law. Governors may declare such for portions or all of the state, if local police and officials can't keep order. There are federal regulations for a president to restore order during disasters and loss of local/state government authority. However, the president is supposed to contact the governors first to ask if such is required. Even then, there are checks upon martial law implementation.