That could be anything from a dry thread or interface to a worn bearing/bushing or a cracked frame.
Bushing wear: hold the bike and pic it up/drop it, if it feels rattly its the shock bushes (prophets eat these for breakfast)
Bearign wear: take the rear wheel, mechs, chain etc and shock off, move the swingarm u and down, it should be smppth as a babies backside, if its nto, the bearings have gone. If they get really bad the whole swingarm will flop from side to side.
Anything else and its time to take it appart bit by bit, clean the threads, rebuild with gresh grease, untill you find the thread at fault, its often the pedal threads IME.