Must be pretty soggy (=wet and soft) ground if you are able to walk 'in' it!
My hobbies are sleeping, and walking by the riverside.
2. I walk by the riverside once a week for an hour.
'along' is also appropriate if you mean in a constant direction, following the river, walking on the bank of the river.
'by' means 'to the side of'. There may be a small park by the riverside. You are walking 'by the riverside' in this park, but not 'along' - you are walking around in the park, not following the course of the river.
Note: I have put a comma after 'sleeping'. Without the comma, the sentence would mean:
One of my hobbies is sleeping by the riverside.
One of my hobbies is walking by the riverside.
I think you mean, you enjoy sleepng and walking, (but not sleep-walking); and not both are done 'by the riverside' - only the 'walking'.
If you do mean both are done by the riverside, then leave out the comma and put something waterproof on the ground!