Can I install a main water shutoff up higher?
Normally the valve is installed as soon as possible upon entering the home, and the pipe enters low to protect it from freezing (at least in freezing climates.) The logic is that this minimizes the area where a fault can occur that you cannot shut off. The secondary logic is that you rarely need to shut off the main supply, so it need not be too convenient.

I do not know if anything is enshrined in code to that effect, but that's why it's done the way it's done. If you do what you propose, you have an extra 4 feet of pipe and an elbow that could fail with you having no way to shut the water off from inside the house.

If you feel strongly about it, there's nothing that would prevent you from installing a SECOND shutoff valve where you propose, leaving the original one where it is. Personally I like to set up secondary shutoffs to minimize inconvenience when things do need to be shut off - ie, have two, one of which leaves bathroom A functional, the other of which leaves bathroom B functional, so that (at least) one bathroom can be used when the water is shut off to the other half of the fixtures.