Check your posture
Getting your seating right can go a long way to helping you to avoid injuries and strains.
Two things to work out are:
Seat height
Distance from the keyboard
Both will affect the level of tension in your back, shoulders, arms, and wrists.
Seat distance
If you use a smaller MIDI keyboard, this may not affect you as much but keeping a nice seat distance does allow you to play comfortably for longer. For people with a fuller range keyboard, keeping a correct distance frees you up to sit more naturally, and move as you play. This will reduce the pressure on your arms.
Position your chair a comfortable distance from your instrument, and sit toward the edge of your seat.
Seat height
Make sure that the seat height allows your forearms to settle nice and straight, without being rigid.
Sitting too low can strain your wrists and shoulders, and mean they tire easily. Sitting too high can create tension in your forearms.
Positioning your hands and fingers
Beginner pianists are often told to imagine that they’re holding an egg or a bubble so that they form a round, curved shape with their fingers.
If you do this correctly, your fingertips will be touching the individual keys rather than the flats of your fingers. This will help you build flexibility and strength, and enable you to play with more precision and less fatigue.