Strain effects in freestanding three-dimensional nitride nanostructures