Sounds a lot like you have a loose connection inside. Depending on if it happens when on charger or battery (or both) could make a difference as well.
The only way to know what it is for certain is to open it up. If it is under warranty, I would contact the manufacturer about a repair. If it isn't, then a local tech should be able to fix the issue.