On Instagram, as well as a variety of social networking sites, SMH is an abbreviation for "Shaking My Head." The slang is typically used when the writer believes that the person they are corresponding with has done something that makes no sense or has done something stupid.
The abbreviation SMH can also be used in text messaging programs or instant messaging programs. These shortened Internet abbreviations are typically used to reduce the character count of messages, as some social networking sites and cell phone plans limit the number of characters that can be used per message. The shortened Internet slang has now become popular and is commonly used even on sites that do not limit characters.