Regulus honestly didn't know when it had even started. He didn't know when the nightmares started and when he stopped being able to get more than four hours of sleep each night, if he fell asleep at all.
He was stuck in a state of constant exhaustion but was unable to do anything about it. There was no doubt many people had noticed, especially Barty and Evan, but Regulus snapped at them each time they asked until they finally stopped asking and stuck to worried glances.
It was around this time in Regulus’s fourth year when he had also been unable to sleep. That caused him to go for walks around the castle and once on a full moon. Only for the Slytherin boy to notice a group of four, but the animals wouldn't naturally mix.
Obviously, Regulus had secretly followed until he found the truth. It was the Marauders-something that Regulus scoffed at because of course it was, and three were animagi while one of them- Remus- was a werewolf. This lead to Regulus becoming curious about the whole process of being an animgus.
It had taken a while, and even more sleepless nights, until Regulus felt he had perfected the transformation process enough to try it out. There was no telling what he'd be. After all, Sirius was a large black dog, Peter was a rat and James was a stag.
But, if Regulus was being honest, he hadn't been too surprised when he was suddenly a small black cat. It fit his nature quite well. Regulus was pleased with this and it gave him an escape from being himself whenever he wanted- which was quite a lot.
Around this time, Regulus had realised he had quite an annoying crush on James. The idiot who had notoriously been in love with Lily and also Sirius's bestfriend. Regulus wished he could kill his own heart sometimes.
So, all of this mixed together, had lead to these situations. The ones where Regulus would go out at night in his animagus form, only to find James in his stag form each night. James didn't know who he was, probably thinking he was a stray. Regulus didn't mind as they explored together.