Begin with a pattern. Although freestyle affords you the freedom to do anything you want, a simple pattern can get you started. Freestyle solos are built by stringing together a series of patterns that repeat. Begin with something simple. Play three notes per string, with one open fret between each of the notes.
Play your pattern forward and reverse, starting off slowly and building speed gradually, with each pass of the pattern. Allow yourself to add techniques as they come to your mind, but don't think ahead. As soon as a technique comes to mind, put it into play. This can include bending strings, hitting a tremolo bar or changing the rhythm of the notes you're playing.
Move your pattern up the neck (higher in register). Add an additional note per string and use your fourth finger to play the note. Add some color to your solo by playing two strings simultaneously, dragging your pick along the strings between patterns or by filling in between solo runs with a chord or two.