The exact cause of malrotation is not well understood. It occurs during the first trimester of pregnancy when the intestines fail to rotate properly as they return to the abdominal cavity from the yolk sac. Genetic factors may play a role, though no specific genes have been definitively linked to the condition.