Well as we are only human, these brain flips can happen, but it doesn't mean that there is anything wrong.
Tiredness, stress, anxiety, dehydration, being preoccupied with other things, can all lead to momentary memory loss. Should other people notice that you are having a problem, then it may be worth getting checked out by the doctor.
Don't be too concerned if it happens once. A long time ago I pulled the "gear up" handle on an multi-engine aircraft as the passengers were deplaning. Arghhh!!! Fortunately a sensor prohibited the gear from retracting. Sometimes people simple have a "brain fart" and do something that is completely inexplicable. If it happens again, think about a neurological check-up.