1. No.
2. Not as long as you don't fall down and hurt yourself.
3. ? I don't understand.
4. Do not do it prone - that is, lying on your belly or face-down. This can cause permanent nerve damage.
Doing masturbation on yourself will not affect your memory.
What will cause memory problems is staying up late and watching late night programmes, playing computer games for too long instead of getting the amount of sleep your body requires to keep healthy.
If you have a poor diet and do not drink enough water or get any infections, that can cause memory problems. So make sure that you have a healthy diet with fresh fruit and vegetables and drink plenty of water so as not to get dehydrated. Dehydration can impair your memory and make you feel foggy.
With regard to masturbation, it is your decision and choice how your masturbate. Just make sure that you have washed and clean hands so that you do not spread any bacteria on to your penis. You may find putting your penis in and out of 2 soft things may be irritating to your penis skin as there will be no lubrication and fabric is dry.