It can be really frustrating, especially if you don't know the piece very well, record yourself and you notice this strange rhythmical alterations happening. If this has happened to you, I know how you feel. In fact, just yesterday I saw one of my organ students do it right in front of my eyes (which of course inspired me to write about it and offer a solution today).
The reason sometimes we do it is that we lose the sense of a pulse. In other words, we get so preoccupied with the notes and playing the right rhythms that we don't notice how we change the pulse from one rhythmical unit to another. Or sometimes we even forget to feel the pulse of the piece at all.
The simple fix to this kind of mistake is to start counting out loud the beats of the measure. For example, in 4/4 meter you would say "One, two, three, four" or even "One and two and three and four and" with eight notes, if you want to be even more precise.
I didn't say it's an easy trick to do. Yes, it's simple, but it's extremely difficult to force yourself to say the numbers out loud while you are playing. Your mind will find all kinds of excuses, such as "I'm not ready for this yet; let me first learn the notes right and then I will worry about the rhythms and pulse; I can count in my head silently and play in time" etc.
Some of these excuses will even partially be true. But if you really want to change the way you keep a steady pulse, do it for while - count out loud the beats and their subdivisions. Doing it aloud will force you to play in time.
This kind of problem normally doesn't happen to people who sight-read regularly and systematically. Somehow the breadth of the repertoire they encounter every day puts them in a mode when they can sort of feel what will be coming up next in the piece. Therefore, illogical things like doubling the note values without a reason will simply be out of question to you. Among other things, sight-reading expands your musical intuition which can be very useful if you have serious goals in organ playing.