Babies arch their backs for various reasons, most of which are harmless. It can happen when they are in a heightened state, such as crying or stretching their muscles. Gas or reflux after feeding is a common cause, as well as when babies are trying to build their muscles during movements like rolling over. Back arching can also be a way for babies to express emotions like being overstimulated or uncomfortable. However, if there are prolonged discomfort or other concerning symptoms, it's important to consult a healthcare provider.