In most cases the person who is suffering from a trapped nerve will recover within few days as long as they get plenty of rest and undertake a very conservative pattern of treatment. In many cases this treatment includes the use of alternating hot and cold treatments along with some very gentle stretching exercises. If the movements exacerbate the pain it may be necessary to immobilize the affected limb or to stick to bed rest if the pinched nerve is in your back or neck.
Depending on the severity of the pain, your doctor may prescribe a regimen of muscle relaxers and pain killers to help you until the pinched nerve is relaxed and back in its normal place. If the pain continues for more than three months you may have to seek a surgical intervention to relieve the pressure on the nerve.
As Sqad says, what we refer to as a trapped nerve is extremely unlikely to be a trapped nerve, it is usually a nerve that has been pinched and injured and due to the inflammation cased it will continue to get damaged due to the inflammation.avoid straining that area and take Ibuprofen.